summaryrefslogtreecommitdiffstats
AgeCommit message (Collapse)Author
2018-03-29Fix permissions (#268)Carl Lerche
2018-03-29Allow customizing the threadpool's parker (#264)Carl Lerche
* Allow customizing the threadpool's parker This patch allows the user of threadpool to customize how the worker threads park themselves. This allows custom parking logic to be injected. For example, this allows embedding a timer on each worker thread. * Call `park` instance every so often. Since the `park` is now customizable, it might have logic that must be called every so often. For example, a timer might have timeouts that it must expire. Currently, if a worker is very busy, it won't call into the `park` instance. This patch changes this so that after every 32 task invocations, `park` is called with a duration of zero.
2018-03-28Provide a timer implementation (#249)Carl Lerche
This patch adds a new crate: tokio-timer. This crate provides an efficient timer implemeentation designed for use in Tokio based applications. The timer users a hierarchical hashed timer wheel algorithm with six levels, each having 64 slots. This allows the timer to have a resolution of 1ms while maintaining O(1) complexity for insert, removal, and firing of timeouts. There already exists a tokio-timer crate. This is a complete rewrite which solves the outstanding problems with the existing tokio-timer library. Closes #146.
2018-03-27Split tokio-threadpool lib.rs into files (#233)Roman
* Builder -> src/builder.rs * Callback -> src/callback.rs * Config -> src/config.rs * Futures2Wake -> src/futures2_wake.rs * Inner -> src/inner.rs * Notifier-> src/notifier.rs * Sender -> src/sender.rs * Shutdown -> src/shutdown.rs * ShutdownTask -> src/shutdown_task.rs * SleepStack -> src/sleep_stack.rs * State -> src/state.rs * ThreadPool -> src/thread_pool.rs * Worker -> src/worker.rs * WorkerEntry -> src/worker_entry.rs * WorkerState -> src/worker_state.rs
2018-03-27fix(cargo): Bump dependencies so that Tokio compiles with minimal versions ↵Klaus Purer
(#258)
2018-03-27Update futures2 Cargo.toml (#256)Carl Lerche
2018-03-27Fix unstable-futures feature flag propagation (#261)Sam Rijs
2018-03-24Disable future 0.2 tests (#259)Carl Lerche
2018-03-23Bump version to v0.1.4 (#252)Carl Lerche
This also bumps: * tokio-executor: v0.1.1 * tokio-reactor: v0.1.1 * tokio-threadpool: v0.1.1
2018-03-23Change hammer test consts (#255)Carl Lerche
2018-03-22Fix a typo in tokio_reactor::PollEvented (#250)Denis
`read_readiness` -> `write_readiness` in *write* methods
2018-03-22Fix `connect` example for UDP (#241)Denis
Close #241
2018-03-22Docs: warn about errors from TcpListener::incoming (#247)Michal 'vorner' Vaner
2018-03-22Add UDP client example (send/recv_dgram) (#239)Denis
2018-03-22implement poll_vectored_* and initializer method for futures2 (#242)Sean McArthur
2018-03-22Fix race condition related bugs (#243)Carl Lerche
* Fix races. This mostly pulls in changes from rust-lang-nursery/futures-rs#881, but also updates Registration to be a bit more obvious as to what is going on. * Reduce spurious wakeups caused by Reactor This patch adds an ABA guard on token values before registering them with Mio. This allows catching token reuse and avoid the notification. This is needed for OS X as the notification is used to determine that a TCP connect has completed. A spurious notification can potentially cause write failures.
2018-03-21Update to futures 0.2.0-beta (#246)Aaron Turon
2018-03-21Runtime builder (#234)Roman
* Split runtime module into files * Add runtime::Builder to set up thread pool.
2018-03-21Lapsus clavis (#245)Cyril Plisko
2018-03-15Add top-level tests for futures 0.2 integration (#231)Aaron Turon
2018-03-15set Runtime thread pool name prefix (#232)Sean McArthur
2018-03-15Fix condition for updating the current date buffer (#230)Hiroaki Nakamura
2018-03-14Move tokio::net module into tokio tcp/udp crates (#224)Sam Rijs
2018-03-13Travis: Move before_deploy out of matrix block (#229)Carl Lerche
2018-03-13Simultaneous futures compat (#172)Aaron Turon
This patch adds opt-in support for futures 0.2.
2018-03-13Reduce AtomicTask spurious notifications (#227)Carl Lerche
2018-03-13Shutdown the runtime on drop (#214)Carl Lerche
Currently, the runtime does not shutdown if the runtime handle is dropped. This can happen during a panic or when the value is simply dropped. This patch forces the runtime to shutdown if it is not explicitly shutdown. Fixes #209
2018-03-13Add LICENSE file to all sub crates (#226)Carl Lerche
* Add LICENSE file to all sub crates * Update links in README
2018-03-13Try compiling Tokio on FreeBSD (#228)Carl Lerche
2018-03-13Fix docs markup (#225)hcpl
2018-03-13Fix build on FreeBSD (#218)Wesley Moore
2018-03-13Handle futures that panic on a threadpool (#216)Carl Lerche
If a future panics from within the context of a thread pool, the pool should not be impacted. To do this, polling the future is wrapped with a catch_unwind. Extra care is taken to ensure that `thread::panicking()` is set from within the future's drop handle. Fixes #209
2018-03-12Update comment in udp-codec example (#222)Gray Olson
2018-03-11Remove uses of futures_cpupool (#220)Jeehoon Kang
2018-03-09Relicense Tokio exclusively under the MIT license. (#215)Carl Lerche
This patch relicenses the Tokio project exclusively under the MIT license. Before this, the project was dual licensed under MIT and Apache 2. As such, switching to only MIT is permitted. Fixes #202
2018-03-09Fix wrong file link in examples readme.md (#208)Tosil Velkov
2018-03-09tokio-threadpool: bump rand to 0.4 (#205)Igor Gnatenko
2018-03-09tokio-reactor: bump mio to 0.6.14 (#204)Igor Gnatenko
With 0.6.13 it doesn't compile: no method named `as_usize` found for type `mio::Ready` in the current scope
2018-03-09Bump version to v0.1.3 (#213)Carl Lerche
2018-03-09CurrentThread::turn should block on idle. (#212)Carl Lerche
This patch fixes a bug where `CurrentThread::turn` is expected to block even if the executor is idle. The `turn` API is the low level interface for callers to interact with the `Sleep` instance used by the `CurrentThread` instance. As such, a call to `turn` is expected to call `sleep` once if the executor did not perform any work.
2018-03-08Bump tokio to v0.1.2 (#201)Carl Lerche
This also bumps tokio-io to v0.1.6 and prepares for the initial release of tokio-executor, tokio-reactor, and tokio-threadpool.
2018-03-08Add an explicit spawn fn to TaskExecutor (#200)Carl Lerche
2018-03-08Improve the chat example, making it more robust (#199)Carl Lerche
This handles cases where clients send large amounts of data while on localhost. Closes #192
2018-03-08Depend on latest release of Mio (#198)Carl Lerche
2018-03-08Remove premature French translation of "current" (#197)Jake Goulding
2018-03-07Update readme (#196)Carl Lerche
2018-03-07Improve `poll_read_ready` implementation (#193)Carl Lerche
This patch updates `poll_read_ready` to take a `mask` argument, enabling the caller to specify the desired readiness. `need_read` is renamed to `clear_read_ready` and also takes a mask. This enables a caller to listen for HUP events without requiring reading from the I/O resource.
2018-03-06Shutdown the thread pool on drop. (#190)Carl Lerche
Currently, if a thread pool instance is dropped without being shutdown, the workers will run indefinitely. This is not ideal as it leaks the threadpool. This patch forces the thread pool to shutdown on drop. Closes #151
2018-03-06Explicitly deregister I/O resources on drop (#189)Carl Lerche
Mio will be requiring `deregister` to be called explicitly in order to guarantee that Poll releases any state associated with the I/O resource. See carllerche/mio#753. This patch adds an explicit `deregister` function to `Registration` and updates `PollEvented` to call this function on drop. `Registration::deregister` is also called on `PollEvented::into_inner`. Closes #168
2018-03-06Fix benches (#188)Carl Lerche
Some of the benchhmarks were broken and/or using deprecated APIs. This patch updates the benches and requires them all to compile without warnings in order to pass CI.