- Jan 25, 2019
-
-
Carl Lerche authored
Also bumps: - tokio-sync (0.1.0) - tokio-threadpool (0.1.11) - tokio-timer (0.2.9)
-
Carl Lerche authored
-
- Jan 24, 2019
-
-
Zahari Dichev authored
Reset the delay of the queue in case an item that expires sooner than the last inserted is put into the queue.
-
Zahari Dichev authored
-
- Jan 23, 2019
-
-
Jon Gjengset authored
-
Jon Gjengset authored
Following from https://github.com/tokio-rs/tokio/pull/865, this PR removes `#[derive(Debug)]` on `mpsc` sender and receiver types in favor of explicit `impl fmt::Debug` blocks that don't have a `T: fmt::Debug` bound.
-
Jon Gjengset authored
`#[derive(Clone)]` on a type `struct Foo<T>` adds an impl that requires that `T: Clone`: ```rust impl<T: Clone> Clone for Foo<T> ``` which is unfortunate in the case of senders, because we don't want to require that the items being sent are `Clone` for the channel sender to be `Clone`. This PR adds an explicit `impl Clone` for the bounded and unbounded sender types which does not have the `T: Clone` bound. Note that this is _also_ an issue with `#[derive(Debug)]`, but that one is harder to work around as `chan::Tx` _also_ has `#[derive(Debug)]`, as does `chan::Chan`, so we'd have to add explicit impls for all of them to make progress.
-
- Jan 22, 2019
-
-
Sean McArthur authored
-
Carl Lerche authored
Introduce a tokio-sync crate containing useful synchronization primitives for programs written using Tokio. The initial release contains: * An mpsc channel * A oneshot channel * A semaphore implementation * An `AtomicTask` primitive. The `oneshot` and `mpsc` channels are new implementations providing improved performance characteristics. In some benchmarks, the new mpsc channel shows up to 7x improvement over the version provided by the `futures` crate. Unfortunately, the `oneshot` implementation only provides a slight performance improvement as it is mostly limited by the `futures` 0.1 task system. Once updated to the `std` version of `Future` (currently nightly only), much greater performance improvements should be achievable by `oneshot`. Additionally, he implementations provided here are checked using [Loom](http://github.com/carllerche/loom/), which provides greater confidence of correctness.
-
- Jan 20, 2019
-
-
rmcteggart-r7 authored
-
Eliza Weisman authored
-
- Jan 17, 2019
-
-
Stjepan Glavina authored
## Motivation When the thread pool shuts down, futures that have been polled at least once but not completed yet are simply leaked. We should drop them instead. ## Solution Multiple changes are introduced: * Tasks are assigned a home worker the first time they are polled. * Each worker contains a set of tasks (`Arc<Task>`) it is home to. When a task is assigned a home worker, it is registered in that worker's set of tasks. When the task is completed, it is unregistered from the set. * When the thread pool shuts down and after all worker threads stop, the remaining tasks in workers' sets are aborted, i.e. they are switched to the `Aborted` state and their `Future`s are dropped. * The thread pool shutdown process is refactored to make it more robust. We don't track the number of active threads manually anymore. Instead, there's `Arc<ShutdownTrigger>` that aborts remaining tasks and completes the `Shutdown` future once it gets destroyed (when all `Worker`s and `ThreadPool` get dropped because they're the only ones to contain strong references to the `ShutdownTrigger`). Closes #424 Closes #428
-
- Jan 13, 2019
-
-
Marek Kotewicz authored
-
- Jan 12, 2019
-
-
Marek Kotewicz authored
* docs: fixed links in tokio-timer/src/timer/mod.rs * docs: fixed links in tokio-timer::clock
-
- Jan 10, 2019
-
-
Marek Kotewicz authored
* docs: fixed links to tokio_timer::clock::Now in tokio-timer/src/timer/mod.rs * docs: fixed links to std::time::Instant in tokio-timer/src/timer/mod.rs
-
Carl Lerche authored
-
- Jan 08, 2019
-
-
Sean McArthur authored
-
- Jan 07, 2019
-
-
Carl Lerche authored
This is required for publishing to crates.io
-
Carl Lerche authored
Also bumps: * tokio-async-await (0.1.5) * tokio-executor (0.1.6) * tokio-fs (0.1.5) * tokio-io (0.1.11) * tokio-reactor (0.1.8) * tokio-tcp (0.1.3) * tokio-threadpool (0.1.10) * tokio-tls (0.2.1) * tokio-uds (0.2.5) ...and updates LICENSE files to 2019.
-
Carl Lerche authored
This reverts commit 7a49ebb6. The commit conflicted with another change that was merged, causing CI to fail. The public API also requires a bit more refinement (#833) and Tokio crates need to be released.
-
- Jan 05, 2019
-
-
Moritz Gunz authored
-
Stjepan Glavina authored
-
Stjepan Glavina authored
-
Carl Lerche authored
-
Ryan Huang authored
-
- Jan 04, 2019
-
-
Sean McArthur authored
Disabling all features means the only dependency is `futures`. Relevant pieces of the API can then be enabled with the following features: - `codec` - `fs` - `io` - `reactor` - `tcp` - `timer` - `udp` - `uds` This also introduces the beginnings of enabling only certain pieces of the `Runtime`. As a start, the entire default runtime API is enabled via the `rt-full` feature.
-
Carl Lerche authored
The commented out lines are no longer relevant and will not be brought back.
-
- Jan 03, 2019
-
-
Carl Lerche authored
Two unrelated PRs to the same file resulted in a broken build. This patch fixes the build by including `Arc`.
-
Carl Lerche authored
The unused lint on nightly has discovered a new unused fn.
-
Stjepan Glavina authored
-
- Jan 02, 2019
-
-
Taiki Endo authored
Error::cause is deprecated in Rust 1.33, but this allows Error::cause until the minimum supported version of tokio is Rust 1.30. When the minimum support version of tokio reaches Rust 1.30, replace Error::cause with Error::source. Fixes: #817
-
gralpli authored
-
- Dec 29, 2018
-
-
jq-rs authored
-
- Dec 28, 2018
-
-
Balthild Ires authored
Box::pinned has been renamed to Box::pin. Meanwhile, the pin feature no longer requires an attribute to enable. Fixes: #813
-
Sean McArthur authored
The side effects of calling `Handle::current()` from outside of a runtime could be very surprising, since it would start up a background reactor.
-
Pavel Strakhov authored
-
Stjepan Glavina authored
-
Roman authored
-
- Dec 17, 2018