- Mar 09, 2018
-
-
Carl Lerche authored
This also bumps tokio-io to v0.1.6 and prepares for the initial release of tokio-executor, tokio-reactor, and tokio-threadpool.
-
- Mar 08, 2018
-
-
Carl Lerche authored
-
Carl Lerche authored
This handles cases where clients send large amounts of data while on localhost. Closes #192
-
Carl Lerche authored
-
Jake Goulding authored
-
Carl Lerche authored
-
Carl Lerche authored
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.
-
- Mar 07, 2018
-
-
Carl Lerche authored
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
-
- Mar 06, 2018
-
-
Carl Lerche authored
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
-
Carl Lerche authored
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.
-
Carl Lerche authored
The PR that updated the examples skipped some comments. This patch updates thhe comments.
-
Colin Rofls authored
-
Carl Lerche authored
The exampes included in the repository have lagged behind the changes made. Specifically, they do not use the new runtime construct. This patch updates examples to use the latest features of Tokio.
-
Roman authored
- UdpSocket -> src/net/udp/socket.rs - SendDgram -> src/net/udp/send_dgram.rs - RecvDgram -> src/net/udp/recv_dgram.rs
-
Jeehoon Kang authored
-
- Mar 05, 2018
-
-
Roman authored
- Incoming -> src/net/tcp/incoming.rs - TcpListener -> src/net/tcp/listener.rs - TcpStream, ConnectFuture -> src/net/tcp/stream.rs
-
Philip Munksgaard authored
-
- Mar 04, 2018
-
-
Carl Lerche authored
Tokio is moving away from using `WouldBlock`, instead favoring `Async::NotReady`. This patch updates the TCP and UDP types, deprecating any function that returns `WouldBlock` and adding a poll_ prefixed equivalent.
-
- Mar 02, 2018
-
-
Carl Lerche authored
Currently, `tokio::spawn` matched the `spawn` function from futures 0.2. However, this adds additional ergonomic overhead and removes the ability to spawn from a drop fn. See rust-lang-nursery/futures-rs#830. This patch switches the behavior to access the thread-local variable referencing the default executor directly in the `spawn` function.
-
Carl Lerche authored
This removes the need for the `try_nb` macro as well as bring the traits closer in line with the planed 0.2 iteration.
-
Carl Lerche authored
This allows libraries that require access to reactor related types to depend on this crate without having to depend on the entirety of Tokio. For example, libraries that implement their custom I/O resource will need to access `Registration` or `PollEvented`.
-
Carl Lerche authored
-
Carl Lerche authored
This patch updates the documentation for a number of APIs. It also introduces a prelude module and an io facade module, re-exporting types from tokio-io.
-
- Feb 28, 2018
-
-
Carl Lerche authored
-
Carl Lerche authored
-
Carl Lerche authored
Sometimes, passing ownership to an executor is necessary. For example, some libraries require taking ownership of one. This patch adds a function that returns an executor associated with a runtime.
-
Carl Lerche authored
This patch makes a significant change to how I/O resources bind to a reactor. Currently, an I/O resource (TCP, UDP, PollEvented) will bind itself with a reactor upon creation. First, some history. Originally, tokio-core required that I/O resources be explicitly associated with a reactor upon creation by passing in a `&Handle`. Tokio reform introduced a default reactor. If I/O resources do not specify a reactor upon creation, then the default reactor is used. However, futures tend to favor being lazy. Creating a future should do no work, instead it is defining a computation to be performed once the future is executed. Binding an I/O resource with a reactor on creation goes against this pattern. This patch fixes this by allowing I/O resources to lazily bind to a reactor. An explicit `&Handle` can still be used on creation, but if no reactor is specified, then the default reactor is used. However, this binding happens during execution time (read / write) and not creation.
-
Roman authored
* Create variables as closer as possible to their usage * Check that no message is lost in test current_thread::hammer_turn
-
- Feb 27, 2018
-
-
Carl Lerche authored
Currently, the thread-local tracking the current thread executor is not set when a task is dropped. This means that one cannot spawn a new future from within the drop implementation of another future. This patch adds support for this by setting the thread-local before releasing a task. This implementation is a bit messy. It probably could be cleaned up, but this is being put off in favor of trying a more comprehensive reorganization once the current thread executor is feature complete.
-
Roman authored
-
Carl Lerche authored
The logic that enables `CurrentThread::turn` to avoid unbounded iteration was incorrect. It was possible for unfortunate timing to result in a dead lock. This patch provides a fix as well as a test.
-
- Feb 26, 2018
-
-
Carl Lerche authored
Try using an env var to enforce the doc deploy condition.
-
Carl Lerche authored
-
Ben Boeckel authored
This method is useful when reading from a operating system service.
-
Alan Somers authored
FreeBSD uses a separate kqueue filter type for lio_listio. This change adds support for that filter type. Full functionality will be provided by the mio-aio and tokio-file crates. * Add PollEvented::into_inner Consumes a PollEvented and returns its inner io object. Useful for io types that have exclusive ownership of a resource. See also https://github.com/tokio-rs/tokio-core/commit/9400ffb
-
- Feb 24, 2018
-
-
Carl Lerche authored
CurrentThread::turn uses a turn count strategy to allow `turn` to not run infinitely. Currently, there is a bug where spawned tasks will not get executed in calls to `turn`. This patch fixes the bug by correctly setting the turn count for newly spawned tasks.
-
- Feb 21, 2018
-
-
Carl Lerche authored
This patch is an intial implementation of the Tokio runtime. The Tokio runtime provides an out of the box configuration for running I/O heavy asynchronous applications. As of now, the Tokio runtime is a combination of a work-stealing thread pool as well as a background reactor to drive I/O resources. This patch also includes tokio-executor, a hopefully short lived crate that is based on the futures 0.2 executor RFC. * Implement `Park` for `Reactor` This enables the reactor to be used as the thread parker for executors. This also adds an `Error` component to `Park`. With this change, a `Reactor` and a `CurrentThread` can be combined to achieve the capabilities of tokio-core.
-
- Feb 20, 2018
-
-
Carl Lerche authored
-
- Feb 14, 2018
-
-
cetra3 authored
-
- Feb 13, 2018
-
-
Roman authored
-