Commit graph

31 commits

Author SHA1 Message Date
Miguel Pérez García
84b6d2b276 Removing duplicated tests 2019-12-12 18:34:02 -06:00
Miguel Pérez García
8de9f9b8e1 Merge branch 'future-timeout' of https://github.com/miker1423/async-std into future-timeout 2019-12-12 18:31:45 -06:00
Miguel Pérez García
cc85533f7c fixing format 2019-12-05 21:15:32 -06:00
Miguel Pérez García
4670388a56 Adding tests 2019-12-05 08:10:06 -06:00
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.
2019-11-25 23:30:31 +01:00
Pascal Hertleif
e01f07d72a Add context to more errors
cc #569
2019-11-21 00:27:47 +01:00
Pascal Hertleif
c704643296 Remove verbose-errors cargo feature 2019-11-19 13:15:48 +01:00
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).
2019-11-17 21:54:44 +01:00
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
2019-11-07 22:01:36 +00:00
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
2019-11-03 00:11:59 +01:00
Yoshua Wuyts
c413e717da
Merge pull request #429 from markhildreth/tcp_smoke_tests
Added TCP smoke tests against std Listener and Stream
2019-11-02 02:30:42 +01:00
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
2019-11-01 02:45:33 +01:00
Mark Hildreth
c6c2bfa456 Added TCP smoke tests against std Listener and Stream 2019-10-31 11:24:23 -04:00
k-nasa
7fe2a1bbce fix clippy::cognitive_complexity 2019-10-27 20:32:22 +09:00
k-nasa
c9d958d309 $cargo fix -Z unstable-options --clippy --features unstable 2019-10-27 20:31:53 +09:00
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
2019-10-23 17:02:03 +01:00
Taiki Endo
e405544ea0
Enable tests on CI (#357)
* Enable tests on CI

* Fix failed test
2019-10-17 07:06:29 +09:00
k-nasa
ad156b1fce feat: Add BufWriter::into_inner flush 2019-10-13 15:55:32 +09:00
Stjepan Glavina
da2335bd57 Cleanup BufWriter 2019-10-09 14:45:40 +02:00
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
2019-10-07 16:49:42 +02:00
Yoshua Wuyts
0b39306b74
fix barrier tests
Signed-off-by: Yoshua Wuyts <yoshuawuyts@gmail.com>
2019-09-26 17:24:24 +02:00
dignifiedquire
b77b72d333 feat: implement sync::Barrier
Based on the implementation in https://github.com/tokio-rs/tokio/pull/1571
2019-09-25 21:10:06 +02:00
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
Yuxuan Shui
2ca9c46b4b
Add tests for UnixDatagram from_raw_fd/into_raw_fd 2019-09-05 23:56:31 +01:00
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
2019-09-04 20:09:49 +02:00
Roman Proskuryakov
b95dd13d3b add tests for io::timeout 2019-08-21 22:22:16 +03:00
Yoshua Wuyts
63ad786768
remove async_await feature gate
Signed-off-by: Yoshua Wuyts <yoshuawuyts@gmail.com>
2019-08-21 00:29:35 -07:00
Stjepan Glavina
13835b0a78 Formatting 2019-08-14 15:57:51 +02:00
Stjepan Glavina
1f9628d8ad Cleanup 2019-08-12 20:29:16 +02:00
Stjepan Glavina
a430e27819 Cleanup, docs, fmt 2019-08-12 18:00:21 +02:00
Florian Gilcher
5b0a6269a9
Initial commit 2019-08-08 14:44:48 +02:00