dignifiedquire
3161a4e449
add some missing windows imports
5 years ago
dignifiedquire
228cc59b3b
feat: add spawn_local
5 years ago
dignifiedquire
0a7a52aed5
update to work on smol/master
5 years ago
dignifiedquire
10c8b9a6d8
silence must use
5 years ago
dignifiedquire
ab9d6554aa
switch to smol::Timer
5 years ago
dignifiedquire
f5fa0d7e4e
avoid boxing futures
5 years ago
dignifiedquire
b96afc41dc
implement task locals
5 years ago
dignifiedquire
75ab7219df
bring back random
5 years ago
dignifiedquire
e082634b5e
fix spawning
5 years ago
dignifiedquire
fc9ee0dfdd
keep std::sync::Arc
5 years ago
dignifiedquire
1308fbdf55
switch to smol instead of an internal runtime
5 years ago
Friedel Ziegelmayer
b446cd0230
Merge pull request #748 from async-rs/fix/scheduler-2
...
fix(rt): bring back dynamic machines
5 years ago
Thayne McCombs
db438abb8f
Implement async_std::sync::Condvar ( #369 )
...
* Implement async_std::sync::Condvar
Part of #217
* More rigourous detection of notification for condvar
* Use state of Waker instead of AtomicUsize to keep track of if task was
notified.
* Add test for notify_all
* Implement wait_timeout_until
And add warnings about spurious wakeups to wait and wait_timeout
* Use WakerSet for Condvar
This should also address concerns about spurious wakeups.
* Add test for wait_timeout with no lock held
* Add comments describing AwaitNotify struct
And remove an unnneded comment in a Debug implementation
5 years ago
dignifiedquire
a4e07e345c
fix(rt): bring back dynamic machines
...
Even if we do not make use of the progress blocking, we do need to make use of the dynamic restarting of machines as far as I understand.
Keeps the perf, while removing the regression from #747
5 years ago
dignifiedquire
0c9a66c1f6
fix scheduler loop
...
This now matches more closely the logic as implemented in #631 , and fixes the performance regression as far as I have observed.
Closes #746
5 years ago
Friedel Ziegelmayer
fc4e472599
Merge pull request #733 from k-nasa/new-scheduler
...
New scheduler
5 years ago
k-nasa
088aa5662c
refactor: Remove wrapping cell
5 years ago
Devashish Dixit
68fa054517
Update futures-timer to 3.0.2
5 years ago
k-nasa
11ee2a8985
fix
5 years ago
k-nasa
322911142c
lock processor and remove unsafe Send, Sync
5 years ago
k-nasa
cfaec2aa95
re add spin_lock
5 years ago
k-nasa
6d3ca5a06f
remove poll function
5 years ago
k-nasa
f960776846
fix
5 years ago
k-nasa
24c5dbf949
Remove scheduler state
5 years ago
k-nasa
d7ee29a03f
fix test code
5 years ago
k-nasa
2b44c1be2e
refactor: swap to swap_and_compare
5 years ago
k-nasa
b1ec1ea930
Move Spinlock to sync module
5 years ago
k-nasa
2ab075d027
refactor
5 years ago
k-nasa
c0f18600cf
run ignored test
5 years ago
k-nasa
6c8237276b
fix doc test
5 years ago
k-nasa
98cbf7f8eb
Restore task::spawn_blocking
5 years ago
k-nasa
84e5c5f351
Merge branch 'master' into new-scheduler
5 years ago
Yoshua Wuyts
b7c7efc797
Update try_channel doctests
5 years ago
Yoshua Wuyts
7885c245c5
recverror
...
Signed-off-by: Yoshua Wuyts <yoshuawuyts@gmail.com>
5 years ago
Yoshua Wuyts
7b7b959a6e
mark channel errs as unstable
...
Signed-off-by: Yoshua Wuyts <yoshuawuyts@gmail.com>
5 years ago
Yoshua Wuyts
32dce319d3
expose try_recv and try_send on channels
...
Signed-off-by: Yoshua Wuyts <yoshuawuyts@gmail.com>
5 years ago
Yoshua Wuyts
49dd02b4de
Make the split struct public
5 years ago
Yoshua Wuyts
bb11c676a1
doctests pass
5 years ago
Yoshua Wuyts
e026b7579a
Merge pull request #703 from spacekookie/recv-docs
...
channel/recv: improving function docs and code example
5 years ago
k-nasa
8931d1464e
fix ci
5 years ago
nasa
cc19592f80
Revert "Stabilize most stream method and remove unnecessary macros"
5 years ago
k-nasa
b95bd6c1fe
fix: Remove unnecessary io modules
5 years ago
k-nasa
1e18839f1f
fix warning
5 years ago
k-nasa
f31878655e
fix: Stabilize stream method
5 years ago
k-nasa
9a62df143f
add whitespace
5 years ago
k-nasa
75223905bd
fix: Stabilize stream most method
5 years ago
k-nasa
be60dd9fe7
fix: Remove unnecessary re-export and macros
5 years ago
k-nasa
23b7c174f3
feat: Stabilize io::Std*Lock
5 years ago
k-nasa
bd60cd9f81
run `cargo fmt`
5 years ago
Yoshua Wuyts
d87e283215
Update src/lib.rs
5 years ago
Yoshua Wuyts
283a54a155
Update src/lib.rs
5 years ago
Yoshua Wuyts
3719484eba
Update src/lib.rs
...
Co-Authored-By: nasa <htilcs1115@gmail.com>
5 years ago
Katharina Fey
aae835cc14
channel/recv: improving function docs and code example
...
At the moment it's not clear when and why recv returns Option<T>,
instead of just T. This changed comment makes it clear that None will
only be returned once no data will ever be sent again (i.e. after all
senders are gone).
5 years ago
Oleg Nosov
d7cab38b67
`core` => `std`
5 years ago
Oleg Nosov
32068942a6
Fixed `flatten`
5 years ago
Oleg Nosov
303ac90b7c
Fixed `flat_map`
5 years ago
Yoshua Wuyts
d026c44ea3
Document the core feature
...
Follow-up to https://github.com/async-rs/async-std/pull/680
5 years ago
Yoshua Wuyts
125fa5b0a0
Merge pull request #680 from k-nasa/no_std
...
Some modules support no_std
5 years ago
k-nasa
0d90cb07b9
fix: Move `extern crate alloc` to lib.rs
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
7efe7caf66
fix: Change feature name no-std to alloc
5 years ago
k-nasa
22d929d481
fix import Future
5 years ago
k-nasa
d622ec5d35
feat: Make the stream module no_std
5 years ago
k-nasa
880b7ee987
remove crate::prelude import
5 years ago
k-nasa
1762de285b
feat: Make the future module no_std
5 years ago
k-nasa
6aa55fde59
feat: Make the task module no_std
5 years ago
k-nasa
3d32fd81f4
feat: Make the utils module no_std
5 years ago
k-nasa
51b84a7620
feat: Add no_std attribute when not std feature
5 years ago
Toralf Wittner
57974ae0b7
Use non-blocking connect for TcpStream. ( #687 )
...
* Use non-blocking connect for TcpStream.
Instead of spawning a background thread which is unaware of any timeouts
but continues to run until the TCP stack decides that the remote is not
reachable we use mio's non-blocking connect.
mio's `TcpStream::connect` returns immediately but the actual connection
is usually just in progress and we have to be sure the socket is
writeable before we can consider the connection as established.
* Add Watcher::{poll_read_ready, poll_write_ready}.
Following a suggestion of @stjepang we offer methods to check for
read/write readiness of a `Watcher` instead of the previous approach to
accept a set of `Waker`s when registering an event source. The changes
relative to master are smaller and both methods look more useful in
other contexts. Also the code is more robust w.r.t. wakeups of the
`Waker` from clones outside the `Reactor`.
I am not sure if we need to add protection mechanisms against spurious
wakeups from mio. Currently we treat the `Poll::Ready(())` of
`Watcher::poll_write_ready` as proof that the non-blocking connect has
finished, but if the event from mio was a spurious one, it might still
be ongoing.
5 years ago
Yoshua Wuyts
57f9fb7e93
Merge pull request #682 from k-nasa/impl_clone_for_dir_entry
...
Implement Clone trait for DirEntry
5 years ago
Yoshua Wuyts
6c1b5eb3ed
Merge pull request #667 from olegnn/option_take_while
...
Use `take_while` instead of `scan` in `impl` of `Product`, `Sum` and `FromStream` for `Option` and `Result`
5 years ago
Florian Gilcher
84fe94444b
Merge pull request #675 from k-nasa/add_timeout_example
...
Add stream::timeout example when timeout error
5 years ago
Katharina Fey
81aa6d152a
Changing task::block_on to park after a single poll ( #684 )
...
This was previously discussed in #605 and others as a source of high
CPU load when sleeping tasks because of the overhead created by
retrying a future in short succession.
5 years ago
k-nasa
2221441a4c
feat: Implement Clone trait for DirEntry
5 years ago
Oleg Nosov
ed7ddacb28
Rewrote `Result`s implementation using `take_while` and `filter_map`
5 years ago
Oleg Nosov
ed248017b4
Use internal `scan` state in `Result`s implementation
5 years ago
Oleg Nosov
38de0bfd22
Use `std::convert::identity`
5 years ago
Oleg Nosov
134089af2c
Use `filter_map(identity)` + other fixes
5 years ago
k-nasa
ee102dfc9e
docs: Add stream::timeout example when timeout error
5 years ago
nasa
1071e82132
Merge pull request #671 from Noah-Kennedy/udp-socket-send-doc
...
Fix docs for UdpSocket::send
5 years ago
noah
0a52864764
Revert "Fixes https://github.com/async-rs/async-std/issues/652 "
...
This reverts commit a4f68066
5 years ago
noah
76993dd755
Revert "Fixes https://github.com/async-rs/async-std/issues/652 "
...
This reverts commit a4f68066
5 years ago
k-nasa
f53fcbb706
test,docs: Add stream::pending example code
5 years ago
k-nasa
e9357c0307
style: Run `cargo fmt`
5 years ago
Qifan Lu
879e14c6ab
Remove size_hint from Stream impl
5 years ago
Qifan Lu
f8dd3d9816
Add stream::pending::{pending, Pending}
5 years ago
noah
a4f6806605
Fixes https://github.com/async-rs/async-std/issues/652
5 years ago
Yoshua Wuyts
5d5064b871
add FromStream Result example ( #643 )
...
Signed-off-by: Yoshua Wuyts <yoshuawuyts@gmail.com>
5 years ago
nasa
0ed0d63094
Remove unnecessary trait bound on FlatMap ( #651 )
...
* Remove unnecessary trait bound on FlatMap
* test: upgrade test code
5 years ago
Oleg Nosov
fb567a3a09
Recovered comments
5 years ago
Oleg Nosov
83afbab2ef
Use `take_while` instead of `scan` for `Option`
5 years ago
dignifiedquire
9c6ab5e7c3
fix
5 years ago
dignifiedquire
9c9ab90da3
feature gate random
5 years ago
dignifiedquire
5bf3d95313
feat: do not require default feature for unstable
5 years ago
Yoshua Wuyts
383057b8ea
Merge pull request #659 from alfiedotwtf/master
...
Tiny grammar fix
5 years ago
Yoshua Wuyts
763862acc7
Merge pull request #661 from async-rs/fix-ci
...
remove usage of deprecated Error method to fix CI
5 years ago
Yoshua Wuyts
e2bb79c207
Merge pull request #648 from spacekookie/master
...
Fixing inaccurate function description in udp::recv
5 years ago
Yoshua Wuyts
dfb0c8124c
remove usage of deprecated method
...
Signed-off-by: Yoshua Wuyts <yoshuawuyts@gmail.com>
5 years ago
Alfie John
af2d46d9b9
Tiny grammar fix
5 years ago
Artem Varaksa
65d7950df1
Fix crate documentation typo
5 years ago