GitOrigin-RevId: 34d4d5f28e8acebb39c4be9d3b7ecf631c017d3c
This commit is contained in:
levlam 2018-09-11 19:57:50 +03:00
parent eff963a7c1
commit 496d7b3e52

View File

@ -90,7 +90,6 @@ class BufferedStdinImpl {
td::thread read_thread_;
std::atomic<bool> close_flag_{false};
void read_loop() {
while (!close_flag_) {
auto slice = writer_.prepare_append();
@ -106,7 +105,7 @@ class BufferedStdinImpl {
}
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;
auto res = ReadFile(native_fd, slice.data(), narrow_cast<DWORD>(slice.size()), &bytes_read, nullptr);
if (res) {
@ -114,7 +113,6 @@ class BufferedStdinImpl {
}
return OS_ERROR(PSLICE() << "Read from [fd = " << native_fd << "] has failed");
}
};
void BufferedStdinImplDeleter::operator()(BufferedStdinImpl *impl) {
impl->close();