Fix CE.
GitOrigin-RevId: 34d4d5f28e8acebb39c4be9d3b7ecf631c017d3c
This commit is contained in:
parent
eff963a7c1
commit
496d7b3e52
@ -90,7 +90,6 @@ class BufferedStdinImpl {
|
|||||||
td::thread read_thread_;
|
td::thread read_thread_;
|
||||||
std::atomic<bool> close_flag_{false};
|
std::atomic<bool> close_flag_{false};
|
||||||
|
|
||||||
|
|
||||||
void read_loop() {
|
void read_loop() {
|
||||||
while (!close_flag_) {
|
while (!close_flag_) {
|
||||||
auto slice = writer_.prepare_append();
|
auto slice = writer_.prepare_append();
|
||||||
@ -106,7 +105,7 @@ class BufferedStdinImpl {
|
|||||||
}
|
}
|
||||||
|
|
||||||
Result<size_t> read(MutableSlice slice) {
|
Result<size_t> read(MutableSlice slice) {
|
||||||
auto native_fd = info_.native_fd().io_handle();
|
auto native_fd = info_.native_fd().fd();
|
||||||
DWORD bytes_read = 0;
|
DWORD bytes_read = 0;
|
||||||
auto res = ReadFile(native_fd, slice.data(), narrow_cast<DWORD>(slice.size()), &bytes_read, nullptr);
|
auto res = ReadFile(native_fd, slice.data(), narrow_cast<DWORD>(slice.size()), &bytes_read, nullptr);
|
||||||
if (res) {
|
if (res) {
|
||||||
@ -114,7 +113,6 @@ class BufferedStdinImpl {
|
|||||||
}
|
}
|
||||||
return OS_ERROR(PSLICE() << "Read from [fd = " << native_fd << "] has failed");
|
return OS_ERROR(PSLICE() << "Read from [fd = " << native_fd << "] has failed");
|
||||||
}
|
}
|
||||||
|
|
||||||
};
|
};
|
||||||
void BufferedStdinImplDeleter::operator()(BufferedStdinImpl *impl) {
|
void BufferedStdinImplDeleter::operator()(BufferedStdinImpl *impl) {
|
||||||
impl->close();
|
impl->close();
|
||||||
|
Loading…
Reference in New Issue
Block a user