summaryrefslogtreecommitdiffstats
path: root/tokio-test
AgeCommit message (Collapse)Author
2019-11-16runtime: rename current_thread -> basic_scheduler (#1769)Carl Lerche
It no longer supports executing !Send futures. The use case for It is wanting a “light” runtime. There will be “local” task execution using a different strategy coming later. This patch also renames `thread_pool` -> `threaded_scheduler`, but only in public APIs for now.
2019-11-15Limit `futures` dependency to `Stream` via feature flag (#1774)Carl Lerche
In an effort to reach API stability, the `tokio` crate is shedding its _public_ dependencies on crates that are either a) do not provide a stable (1.0+) release with longevity guarantees or b) match the `tokio` release cadence. Of course, implementing `std` traits fits the requirements. The on exception, for now, is the `Stream` trait found in `futures_core`. It is expected that this trait will not change much and be moved into `std. Since Tokio is not yet going reaching 1.0, I feel that it is acceptable to maintain a dependency on this trait given how foundational it is. Since the `Stream` implementation is optional, types that are logically streams provide `async fn next_*` functions to obtain the next value. Avoiding the `next()` name prevents fn conflicts with `StreamExt::next()`. Additionally, some misc cleanup is also done: - `tokio::io::io` -> `tokio::io::util`. - `delay` -> `delay_until`. - `Timeout::new` -> `timeout(...)`. - `signal::ctrl_c()` returns a future instead of a stream. - `{tcp,unix}::Incoming` is removed (due to lack of `Stream` trait). - `time::Throttle` is removed (due to lack of `Stream` trait). - Fix: `mpsc::UnboundedSender::send(&self)` (no more conflict with `Sink` fns).
2019-11-12reorganize modules (#1766)Carl Lerche
This patch started as an effort to make `time::Timer` private. However, in an effort to get the build compiling again, more and more changes were made. This probably should have been broken up, but here we are. I will attempt to summarize the changes here. * Feature flags are reorganized to make clearer. `net-driver` becomes `io-driver`. `rt-current-thread` becomes `rt-core`. * The `Runtime` can be created without any executor. This replaces `enter`. It also allows creating I/O / time drivers that are standalone. * `tokio::timer` is renamed to `tokio::time`. This brings it in line with `std`. * `tokio::timer::Timer` is renamed to `Driver` and made private. * The `clock` module is removed. Instead, an `Instant` type is provided. This type defaults to calling `std::time::Instant`. A `test-util` feature flag can be used to enable hooking into time. * The `blocking` module is moved to the top level and is cleaned up. * The `task` module is moved to the top level. * The thread-pool's in-place blocking implementation is cleaned up. * `runtime::Spawner` is renamed to `runtime::Handle` and can be used to "enter" a runtime context.
2019-11-06time: rename `tokio::timer` -> `tokio::time` (#1745)Carl Lerche
2019-11-07chore: update futures to 0.3.0 (#1741)Taiki Endo
2019-11-05runtime: combine `executor` and `runtime` mods (#1734)Carl Lerche
Now, all types are under `runtime`. `executor::util` is moved to a top level `util` module.
2019-11-03test: unify MockTask and task::spawn (#1728)Carl Lerche
Delete `MockTask` in favor of `task::spawn`. Both are functionally equivalent.
2019-11-01runtime: merge multi & single threaded runtimes (#1716)Carl Lerche
Simplify Tokio's runtime construct by combining both Runtime variants into a single type. The execution style can be controlled by a configuration setting on `Builder`. The implication of this change is that there is no longer any way to spawn `!Send` futures. This, however, is a temporary limitation. A different strategy will be employed for supporting `!Send` futures. Included in this patch is a rework of `task::JoinHandle` to support using this type from both the thread-pool and current-thread executors.
2019-10-29sync: move into `tokio` crate (#1705)Carl Lerche
A step towards collapsing Tokio sub crates into a single `tokio` crate (#1318). The sync implementation is now provided by the main `tokio` crate. Functionality can be opted out of by using the various net related feature flags.
2019-10-28executor: move into `tokio` crate (#1702)Carl Lerche
A step towards collapsing Tokio sub crates into a single `tokio` crate (#1318). The executor implementation is now provided by the main `tokio` crate. Functionality can be opted out of by using the various net related feature flags.
2019-10-26io: move into `tokio` crate (#1691)Carl Lerche
A step towards collapsing Tokio sub crates into a single `tokio` crate (#1318). The `io` implementation is now provided by the main `tokio` crate. Functionality can be opted out of by using the various net related feature flags.
2019-10-21timer: move `tokio-timer` into `tokio` crate (#1674)Carl Lerche
A step towards collapsing Tokio sub crates into a single `tokio` crate (#1318). The `timer` implementation is now provided by the main `tokio` crate. The `timer` functionality may still be excluded from the build by skipping the `timer` feature flag.
2019-09-30Prepare for release of 0.2.0-alpha.6 (#1617)Jon Gjengset
Note that `tokio-timer` and `tokio-tls` become 0.3.0-alpha.6 (not 0.2.0)
2019-09-30chore: update futures-preview to 0.3.0-alpha.19 (#1610)Taiki Endo
2019-09-19Release 0.2.0 alpha.5 (#1576)Carl Lerche
2019-09-19chore: deny warnings for doc tests (#1539)Taiki Endo
2019-09-13chore: fix docs links (#1523)Geoff Shannon
2019-08-30test: fix assert format args (#1520)Geoff Shannon
2019-08-29prepare v0.2.0-alpha.4 (#1509)Sean McArthur
2019-08-28prepare v0.2.0-alpha.3 release (#1505)Carl Lerche
2019-08-20chore: bump to newer nightly (#1485)Taiki Endo
2019-08-20timer: introduce delay function shortcut (#1440)Jakub Beránek
This commit adds a simple delay shortcut to avoid writing Delay::new everywhere and removes usages of Delay::new.
2019-08-18docs: fix all rustdoc warnings (#1474)Ivan Petkov
2019-08-18docs: add docs.rs metadata to build with all features (#1471)Ivan Petkov
2019-08-17chore: prepare 0.2.0-alpha.2 release (#1465)Carl Lerche
2019-08-15runtime: refactor thread-local setters (#1449)Douman
2019-08-13test: add a block_on function to tokio-test (#1431)Geoff Shannon
2019-08-10chore: update futures-preview to 0.3.0-alpha.18 (#1427)Taiki Endo
2019-08-11chore: apply unreachable_pub and missing_debug_implementations to all crates ↵Taiki Endo
(#1424)
2019-08-10chore: change default lint level to warning and deny warnings in CI (#1416)Taiki Endo
2019-08-08chore: prepare for v0.2.0-alpha.1 release (#1410)Lucio Franco
2019-08-07chore: enable full CI run (#1399)Carl Lerche
* update all tests * fix doc examples * misc API tweaks
2019-08-07Remove git dep and add macro examples (#1404)Lucio Franco
Signed-off-by: Lucio Franco <luciofranco14@gmail.com>
2019-08-06sync: polish and update API doc examples (#1398)Carl Lerche
- Remove `poll_*` fns from some of the sync types. - Move `AtomicWaker` and `Lock` to the root of the `sync` crate.
2019-07-26ci: enable clippy lints (#1335)Taiki Endo
2019-07-15io: Minor adjustments to tokio-test IO (#1306)Sean McArthur
This also re-exports `bytes::{Buf, BufMut}` from `tokio-io`.
2019-07-15chore: use ready macro from `futures-core` (#1300)Gurwinder Singh
2019-07-12tokio-test: add tokio_test::io mock builderSean McArthur
2019-06-30timer: finish updating timer (#1222)Carl Lerche
* timer: restructure feature flags * update timer tests * Add `async-traits` to CI This also disables a buggy `threadpool` test. This test should be fixed in the future. Refs #1225
2019-06-27chore: format code and enable rustfmt CI task (#1212)Carl Lerche
2019-06-26test: get `cargo test --tests` working (#1205)Carl Lerche
Broken tests are disabled
2019-06-24Update Tokio to use `std::future`. (#1120)Carl Lerche
A first pass at updating Tokio to use `std::future`. Implementations of `Future` from the futures crate are updated to implement `Future` from std. Implementations of `Stream` are moved to a feature flag. This commits disables a number of crates that have not yet been updated.
2019-05-14Update Tokio to Rust 2018 (#1082)Carl Lerche
2019-05-03test: re-export macro dependencies (#1077)Carl Lerche
Callers may not always have `futures` available at the root of the crate. Re-exporting dependencies makes them available to the macro at a deterministic location.
2019-04-24chore: remember to remove path deps on release (#1057)Carl Lerche
2019-04-23Introduce `tokio-test` crate (#1030)Lucio Franco