Wouter Geraedts
88cbf2c119
Change throttle test to run in milliseconds
2019-11-12 14:51:11 +01:00
Wouter Geraedts
6f6d5e9d20
Updated throttle fn comments.
...
Co-Authored-By: Yoshua Wuyts <yoshuawuyts+github@gmail.com>
2019-11-12 14:35:03 +01:00
Wouter Geraedts
7c7386735e
Wrap around throttle comment
...
Co-Authored-By: Yoshua Wuyts <yoshuawuyts+github@gmail.com>
2019-11-12 14:34:31 +01:00
Yoshua Wuyts
0d5c7a217f
stabilize task::yield_now
...
Signed-off-by: Yoshua Wuyts <yoshuawuyts@gmail.com>
2019-11-12 02:10:55 +01:00
Stjepan Glavina
1a50ffd144
Delete unused import
2019-11-12 00:38:22 +01:00
Stjepan Glavina
21c5c48cb6
Lower the timeout to 1 second
2019-11-12 00:37:54 +01:00
Stjepan Glavina
6677d52c2d
Improve thread creating algorithm in spawn_blocking
2019-11-12 00:35:29 +01:00
Johannes Weissmann
37922408e5
use pin_project
2019-11-11 22:17:29 +01:00
Johannes Weissmann
7d2282dbd2
fix merge conflict
2019-11-11 22:11:06 +01:00
Johannes Weissmann
60f822bee5
Merge branch 'master' into stream_count
2019-11-11 22:06:09 +01:00
Yoshua Wuyts
4aa9928ece
v1.0.0
...
Signed-off-by: Yoshua Wuyts <yoshuawuyts@gmail.com>
2019-11-11 16:13:22 +01:00
Stjepan Glavina
5438258cee
Remove unused import
2019-11-11 13:19:59 +01:00
Wouter Geraedts
ef958f0408
Use pin_project_lite instead for throttle
2019-11-11 13:09:41 +01:00
Stjepan Glavina
dc5d143c16
Merge branch 'master' into cleanup-stream
2019-11-11 13:08:38 +01:00
Stjepan Glavina
c2f750d288
Cleanup stream module
2019-11-11 13:07:29 +01:00
Wouter Geraedts
139a34b685
Make throttle an unstable feature
2019-11-11 12:26:32 +01:00
Wouter Geraedts
b591fc68bd
Changed semantics of throttle to non-dropping variant with backpressure
2019-11-11 12:17:00 +01:00
Stjepan Glavina
352f18bc2a
Use async_std::sync::Arc in examples ( #501 )
2019-11-11 11:10:36 +01:00
Wouter Geraedts
14d7d3bf9c
Merge remote-tracking branch 'upstream/master' into 342-stream-throttle
2019-11-11 10:15:27 +01:00
Stjepan Glavina
417b548692
Cleanup path module ( #497 )
...
* Cleanup path module
* Derive clone for PathBuf and remove unused import
* impl AsRef<Path> for std::path::PathBuf
* Fix a doc comment
2019-11-11 00:31:33 +01:00
Stjepan Glavina
122e87364b
Remove cache padding in channels
2019-11-09 23:08:31 +01:00
Stjepan Glavina
d4f38e783f
Cleanup future module
2019-11-09 17:26:19 +01:00
Yoshua Wuyts
96d3560742
remove future::*join macros ( #492 )
...
Signed-off-by: Yoshua Wuyts <yoshuawuyts@gmail.com>
2019-11-09 17:02:48 +01:00
Yoshua Wuyts
ac1042a9ca
note on Stream::merge ordering ( #491 )
...
* note on Stream::merge ordering
Signed-off-by: Yoshua Wuyts <yoshuawuyts@gmail.com>
* Update src/stream/stream/mod.rs
2019-11-09 17:02:17 +01:00
Stjepan Glavina
9e185f1c3e
Unstable feature: copy takes arguments by value ( #471 )
...
* Unstable feature: copy takes arguments by value
* Fix feature flags
2019-11-09 16:59:35 +01:00
Yoshua Wuyts
89d611628a
Merge pull request #483 from ryan-scott-dev/rscott/pathbuf_fromiter
...
Add FromIterator and Extend trait implementations for PathBuf
2019-11-09 13:03:28 +01:00
Jayson Reis
d8e52c1002
Implement FromStr for PathBuf
...
This makes PathBuf compatible with std version as you can simply call
let path: PathBuf = FromStr::from_str(s).unwrap()
2019-11-09 12:14:56 +01:00
Yoshua Wuyts
037119c0c0
Merge pull request #478 from portgasd666/master
...
Add Future::join and Future::try_join
2019-11-09 11:31:47 +01:00
Stjepan Glavina
548733e5d5
Cleanup stream traits ( #487 )
...
* Cleanup stream traits
* Fix docs
2019-11-09 11:22:09 +01:00
Abhishek C. Sharma
f04b6f6fe9
Change module level docs for future to refer to join and try_join functions instead of macros
2019-11-09 13:09:47 +05:30
Friedel Ziegelmayer
4a78f731b7
fix: stream::take_while ( #485 )
...
When the predicate is false, the stream should be ended.
2019-11-09 00:00:03 +01:00
Ryan Scott
8f3366072f
Add FromIterator and Extend trait implementations for PathBuf
2019-11-08 22:10:56 +11:00
laizy
fb19ebde17
add Sync
constraint for RwLock to prevent memory unsafety ( #479 )
2019-11-08 08:56:55 +00:00
Abhishek C. Sharma
b14282457c
Add Future::join and Future::try_join
2019-11-08 11:29:39 +05:30
Stjepan Glavina
ab2f64cd84
Mark extend() as unstable
2019-11-08 02:38:49 +01:00
Yoshua Wuyts
335bd34470
Add "std" feature flag ( #476 )
...
* core feature
Signed-off-by: Yoshua Wuyts <yoshuawuyts@gmail.com>
* introduce std + default features
Signed-off-by: Yoshua Wuyts <yoshuawuyts@gmail.com>
* test std features on ci
Signed-off-by: Yoshua Wuyts <yoshuawuyts@gmail.com>
* finish up all features
Signed-off-by: Yoshua Wuyts <yoshuawuyts@gmail.com>
* Fix task_local macro
* Remove crossbeam-channel and futures-timer from std
* Move future::timeout() behind cfg_default
2019-11-07 23:56:58 +00:00
Stjepan Glavina
f588ba6bdd
Spawn more than one blocking thread ( #475 )
...
* Spawn more than 1 blocking thread
* Fix a bug
* Fix check when the thread is last sleeping
2019-11-07 23:39:54 +00:00
Yoshua Wuyts
84880c4d8b
re-export async-attributes ( #238 )
...
* re-export async-attributes
Signed-off-by: Yoshua Wuyts <yoshuawuyts@gmail.com>
* doc order
Signed-off-by: Yoshua Wuyts <yoshuawuyts@gmail.com>
* rebase + rename feature to "attributes"
Signed-off-by: Yoshua Wuyts <yoshuawuyts@gmail.com>
* only expose test and main
Signed-off-by: Yoshua Wuyts <yoshuawuyts@gmail.com>
* async-attributes 1.1.0
Signed-off-by: Yoshua Wuyts <yoshuawuyts@gmail.com>
2019-11-07 22:10:55 +00: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
Yoshua Wuyts
266e6326eb
document path submodule ( #467 )
...
Signed-off-by: Yoshua Wuyts <yoshuawuyts@gmail.com>
2019-11-07 21:48:23 +00:00
Stjepan Glavina
f8e82564d9
Rename stream_extend to extend ( #464 )
...
* Rename stream_extend to extend
* Remove Extend from prelude
* Add stream::extend()
2019-11-07 21:46:58 +00:00
Abhishek C Sharma
eb1ef3f4e4
Minor documentation fix for race and try_race ( #473 )
2019-11-07 19:19:05 +00:00
Yoshua Wuyts
d0f1996759
Merge pull request #388 from felipesere/cycle
...
Implement stream::cycle(..)
2019-11-07 13:14:43 +01:00
Yoshua Wuyts
8a0e29473a
Merge pull request #446 from yjhmelody/stream-cloned
...
Add Stream cloned
2019-11-07 13:13:20 +01:00
Yoshua Wuyts
929027796e
hide future::Flatten
...
Signed-off-by: Yoshua Wuyts <yoshuawuyts@gmail.com>
2019-11-07 03:06:38 +01:00
Yoshua Wuyts
9a8805678e
Merge pull request #443 from portgasd666/master
...
Added Future::flatten
2019-11-07 03:04:23 +01:00
Yoshua Wuyts
a064a5b13e
Merge pull request #459 from stjepang/expose-ext-traits
...
Expose extension traits in preludes
2019-11-07 02:48:50 +01:00
Stjepan Glavina
c34e0f8a35
Update futures to 0.3 ( #463 )
...
* Update futures to 0.3
* Fix a search-and-replace error
* Fix imports in tests
* Fix an import
2019-11-06 20:20:27 +00:00
Stjepan Glavina
93b01e36ed
Clippy fixes ( #462 )
2019-11-06 19:29:17 +00:00
Gabriel Majeri
d502453057
Remove doc Stream
impl for VecDeque
( #461 )
2019-11-06 08:35:31 +00:00
Yoshua Wuyts
3144e217ae
Merge pull request #458 from async-rs/rework-intro
...
rework lib.rs docs
2019-11-06 01:19:16 +01:00
Stjepan Glavina
c3254d78d9
Fix a re-rexport
2019-11-06 01:17:35 +01:00
Yoshua Wuyts
f4fb8a3534
change one line
...
Signed-off-by: Yoshua Wuyts <yoshuawuyts@gmail.com>
2019-11-06 01:04:46 +01:00
Yoshua Wuyts
1c87e97e9c
Apply suggestions from code review
...
Co-Authored-By: Stjepan Glavina <stjepang@gmail.com>
2019-11-06 01:02:39 +01:00
Stjepan Glavina
a757cc02dc
Expose extension traits in preludes
2019-11-06 00:21:32 +01:00
Yoshua Wuyts
ae8b051892
rework lib.rs docs
...
Signed-off-by: Yoshua Wuyts <yoshuawuyts@gmail.com>
2019-11-05 21:00:12 +01:00
Stjepan Glavina
1707638ebb
Update mod.rs
2019-11-05 17:09:32 +00:00
Yoshua Wuyts
84fa4ca068
Merge pull request #456 from stjepang/doc-fixes-links
...
Fix some links in docs
2019-11-05 18:06:03 +01:00
Stjepan Glavina
43bb59cd02
Fix some links in docs
2019-11-05 17:49:05 +01:00
yjh
5179f30d2d
use async_std::stream
2019-11-05 21:15:33 +08:00
yjh
a35602f375
Update mod.rs
2019-11-05 21:08:56 +08:00
Yoshua Wuyts
e14cc2a30d
Merge pull request #452 from stjepang/fix-deadlocks
...
Fix a deadlock in channel
2019-11-05 11:27:00 +01:00
Stjepan Glavina
6d421de992
Fix another clippy warning
2019-11-05 10:16:00 +00:00
Stjepan Glavina
5874392397
Fix a clippy warning
2019-11-04 18:48:49 +01:00
Stjepan Glavina
e9edadffc7
Fix a deadlock in channel
2019-11-04 18:15:12 +01:00
Yoshua Wuyts
282ae064fe
Merge pull request #449 from async-rs/strip-vecdeque
...
remove remaining instances of VecDeque stream
2019-11-04 17:46:19 +01:00
yjh
e85bbe68e6
Merge branch 'master' into stream-cloned
2019-11-04 22:30:46 +08:00
Abhishek C. Sharma
d7afcada76
Fixed ambiguous associated types
2019-11-04 15:19:47 +05:30
Abhishek C. Sharma
e36172e808
Merge remote-tracking branch 'upstream/master'
2019-11-04 14:03:29 +05:30
Abhishek C. Sharma
a3e68704bc
Wrap state enum in public struct
2019-11-04 13:58:14 +05:30
yjh
8bef812e78
Update src/stream/stream/cloned.rs
...
Co-Authored-By: nasa <htilcs1115@gmail.com>
2019-11-04 11:49:50 +08:00
yjh
bf0cd5987a
Update src/stream/stream/cloned.rs
...
Co-Authored-By: nasa <htilcs1115@gmail.com>
2019-11-04 11:49:43 +08:00
Stjepan Glavina
20cdf73bb0
Simplify RwLock using WakerSet ( #440 )
2019-11-04 02:40:55 +01:00
Yoshua Wuyts
ed1cb49807
remove remaining instances of VecDeque stream
...
Signed-off-by: Yoshua Wuyts <yoshuawuyts@gmail.com>
2019-11-04 01:57:53 +01:00
Stjepan Glavina
78614c6c1d
Clarify blocking in channel docs ( #448 )
2019-11-03 22:19:04 +01:00
nasa
ddbbbfc32a
Replace VecDeque
with stream::from_iter
in examples ( #447 )
2019-11-03 13:40:51 +01:00
yjhmelody
4942dc7f9f
Add Stream cloned
2019-11-03 19:19:52 +08:00
Abhishek C. Sharma
e0910be8fb
Added Future::flatten
2019-11-03 11:34:49 +05:30
Felipe Sere
57a6516e63
Make bounds on Stream impl simpler
2019-11-02 22:24:12 -05:00
Felipe Sere
fbd5bd867d
Revert "Only one generic type needed"
...
This reverts commit e9b9284863a614b852c22d58205cb983fc26682a.
2019-11-02 22:24:12 -05:00
Felipe Sere
9ee804f9ed
Only one generic type needed
2019-11-02 22:24:12 -05:00
Felipe Seré
eaa56580e3
Update src/stream/stream/mod.rs
...
Co-Authored-By: Yoshua Wuyts <yoshuawuyts+github@gmail.com>
2019-11-02 22:24:12 -05:00
Felipe Sere
0186124aef
Simpler impl
2019-11-02 22:24:12 -05:00
Felipe Sere
197253aa73
Run fmt
2019-11-02 22:24:12 -05:00
Felipe Sere
19381fa590
One clippy warning
2019-11-02 22:23:46 -05:00
Felipe Sere
ed5b095c73
Run fmt
2019-11-02 22:23:46 -05:00
Felipe Sere
5aadc5e4e9
Make cycle a function on the stream type
2019-11-02 22:23:46 -05:00
Felipe Sere
b979773505
Follow clippys advice
2019-11-02 22:23:46 -05:00
Felipe Sere
fd09e2f248
Run fmt
2019-11-02 22:23:46 -05:00
Felipe Sere
171cc82aed
Replace copy with clone bound
2019-11-02 22:23:46 -05:00
Felipe Sere
83ff11ff4c
Switch cycle to stream
2019-11-02 22:23:46 -05:00
Felipe Sere
e1ba87e7c1
Add slightly better docs
2019-11-02 22:23:46 -05:00
Felipe Sere
8126bb1882
use the module operator to calculate next index
2019-11-02 22:23:46 -05:00
Felipe Sere
486f9a964c
Cycle over a known set of values.
2019-11-02 22:23:46 -05:00
Felipe Sere
a096d5ec2d
stub out an example
2019-11-02 22:23:00 -05:00
Felipe Sere
dea1b67670
Skeleton cycle
2019-11-02 22:23:00 -05: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
9a4f4c591c
Merge pull request #441 from async-rs/stdio-lock-unstable
...
mark stdio-lock structs as unstable
2019-11-03 00:05:11 +01:00
Yoshua Wuyts
6f9436e575
mark stdio-lock structs as unstable
...
Signed-off-by: Yoshua Wuyts <yoshuawuyts@gmail.com>
2019-11-02 23:54:27 +01:00
Yoshua Wuyts
735fa6954e
Replace select!/try_select! with Future::{race,try_race} ( #405 )
...
* init Future::select
Signed-off-by: Yoshua Wuyts <yoshuawuyts@gmail.com>
* implement Future::select
Signed-off-by: Yoshua Wuyts <yoshuawuyts@gmail.com>
* try_select
Signed-off-by: Yoshua Wuyts <yoshuawuyts@gmail.com>
* fixes
Signed-off-by: Yoshua Wuyts <yoshuawuyts@gmail.com>
* works
Signed-off-by: Yoshua Wuyts <yoshuawuyts@gmail.com>
* pass clippy
Signed-off-by: Yoshua Wuyts <yoshuawuyts@gmail.com>
* please clippy
Signed-off-by: Yoshua Wuyts <yoshuawuyts@gmail.com>
* implement feedback from stjepan
Signed-off-by: Yoshua Wuyts <yoshuawuyts@gmail.com>
* rename select to race
Signed-off-by: Yoshua Wuyts <yoshuawuyts@gmail.com>
* fmt
Signed-off-by: Yoshua Wuyts <yoshuawuyts@gmail.com>
2019-11-02 23:00:03 +01:00