2
0
Fork 1
mirror of https://github.com/async-rs/async-std.git synced 2025-01-16 18:59:55 +00:00
async-std/tests
Yuxuan Shui 876059cfe0
Make sure ownership is transferred in into_raw_fd
Previously all of the into_raw_fd implementations only returns a copy of
the inner RawFd, while still holding the ownership of the file
descriptor when returning for into_raw_fd. Since `self` is dropped at
the end of into_raw_fd, the returned file descriptor will actually be
closed, render the function unuseable.

The patch makes sure that into_raw_fd actually takes the ownership of
the file descriptor all the way from the inner IoHandle. To achieve
this, I have to use an Option in IoHandle to store the I/O source. It's
not pretty, but I cannot come up with a better way.
2019-09-06 10:36:25 +01:00
..
addr.rs Implement an async version of ToSocketAddrs (#74) 2019-09-04 20:09:49 +02:00
block_on.rs remove async_await feature gate 2019-08-21 00:29:35 -07:00
io_timeout.rs add tests for io::timeout 2019-08-21 22:22:16 +03:00
mutex.rs remove async_await feature gate 2019-08-21 00:29:35 -07:00
rwlock.rs remove async_await feature gate 2019-08-21 00:29:35 -07:00
task_local.rs remove async_await feature gate 2019-08-21 00:29:35 -07:00
tcp.rs remove async_await feature gate 2019-08-21 00:29:35 -07:00
udp.rs remove async_await feature gate 2019-08-21 00:29:35 -07:00
uds.rs Make sure ownership is transferred in into_raw_fd 2019-09-06 10:36:25 +01:00