Commit Graph

33 Commits (mio-0-7)

Author SHA1 Message Date
Yoshua Wuyts 19fd7a4084 fix channel tests
Signed-off-by: Yoshua Wuyts <yoshuawuyts@gmail.com>
5 years ago
nasa cc19592f80
Revert "Stabilize most stream method and remove unnecessary macros" 5 years ago
k-nasa f33d7f40ab fix test 5 years ago
k-nasa ec4b09ecd0 fix test code 5 years ago
Stjepan Glavina 1d875836a2
Implement Clone for TcpStream (#689)
* Implement Clone for TcpStream

* Update examples

* Remove accidentally added examples
5 years ago
k-nasa 44e38eae59 fix open_file test code 5 years ago
Pascal Hertleif 56538ebd91 Improve verbose errors for socket addresses
Moves the point of adding error context to the net::addr module so that
we have access to the raw address input and can include it in the error
message.
5 years ago
Pascal Hertleif e01f07d72a Add context to more errors
cc #569
5 years ago
Pascal Hertleif c704643296 Remove verbose-errors cargo feature 5 years ago
Pascal Hertleif 8ce3e78952 verbose errors feature
This adds a new "verbose-errors" feature flag to async-std that enables
wrapping certain errors in structures with more context. As an example,
we use it in `fs::File::{open,create}` to add the given path to the
error message (something that is lacking in std to annoyance of many).
5 years ago
Stjepan Glavina bc24503382
Fix deadlock when all receivers are dropped (#474)
* Fix deadlock when all receivers are dropped

* Add a comment to explain the behavior of try_send

* Disable clippy
5 years ago
Aleksey Kladov fa91d7f856 Stream::merge does not end prematurely if one stream is delayed (#437)
* Stream::merge does not end prematurely if one stream is delayed

* `cargo test` without features works

* Stream::merge works correctly for unfused streams
5 years ago
Yoshua Wuyts c413e717da
Merge pull request #429 from markhildreth/tcp_smoke_tests
Added TCP smoke tests against std Listener and Stream
5 years ago
Stjepan Glavina 3dd59d7056
Refactor the task module (#421)
* Refactor the task module

* Fix clippy warning

* Simplify task-local entries

* Reduce the amount of future wrapping

* Cleanup

* Simplify stealing
5 years ago
Mark Hildreth c6c2bfa456 Added TCP smoke tests against std Listener and Stream 5 years ago
k-nasa 7fe2a1bbce fix clippy::cognitive_complexity 5 years ago
k-nasa c9d958d309 $cargo fix -Z unstable-options --clippy --features unstable 5 years ago
Stjepan Glavina b2fe91385b
Add channel behind unstable feature flag (#380)
* Add channel behind unstable feature flag

* Don't check tests without unstable feature flag

* Fix typos

* Remove useless attribute
5 years ago
Taiki Endo e405544ea0
Enable tests on CI (#357)
* Enable tests on CI

* Fix failed test
5 years ago
k-nasa ad156b1fce feat: Add BufWriter::into_inner flush 5 years ago
Stjepan Glavina da2335bd57 Cleanup BufWriter 5 years ago
Miloš Vučenović c3e38150e4 Fix uds listener hanging on accept (#272)
* Fix uds listener hanging on accept

UDS listener was hanging because the accept method would return
`Poll::Pending` without registering the task to be awoken in the case
when underlying unix listener returns a WouldBlock that gets converted
to None. This is a hacky fix for this case.

Should fix #248

* Test simulating uds ping-pong server/client

This one should reproduce #248 bug to prevent further regressions.

* Code review fixes
5 years ago
Yoshua Wuyts 0b39306b74
fix barrier tests
Signed-off-by: Yoshua Wuyts <yoshuawuyts@gmail.com>
5 years ago
dignifiedquire b77b72d333 feat: implement sync::Barrier
Based on the implementation in https://github.com/tokio-rs/tokio/pull/1571
5 years ago
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.
5 years ago
Yuxuan Shui 2ca9c46b4b
Add tests for UnixDatagram from_raw_fd/into_raw_fd 5 years ago
DCjanus 238a3c882b Implement an async version of ToSocketAddrs (#74)
* Implement an async version of ToSocketAddrs

* fix documentation issue

* genius hack: pretending to be `impl Future`

* replace `std::net::ToSocketAddrs` with `async-std::net::ToSocketAddrs`

* Move unit tests into the tests directory

* Stylistic changes

* Remove re-exports in async_std::net

* fix broken link

* some mirror changes

* remove unnecessary format

* migrate: `std::net::ToSocketAddrs` -> `async_std::net::ToSocketAddrs`

* fix typo(tutorial)

* remove unnecessary type bound

* lifetime for future
5 years ago
Roman Proskuryakov b95dd13d3b add tests for io::timeout 5 years ago
Yoshua Wuyts 63ad786768
remove async_await feature gate
Signed-off-by: Yoshua Wuyts <yoshuawuyts@gmail.com>
5 years ago
Stjepan Glavina 13835b0a78 Formatting 5 years ago
Stjepan Glavina 1f9628d8ad Cleanup 5 years ago
Stjepan Glavina a430e27819 Cleanup, docs, fmt 5 years ago
Florian Gilcher 5b0a6269a9
Initial commit 5 years ago