summaryrefslogtreecommitdiffstats
path: root/tokio
AgeCommit message (Collapse)Author
2019-12-27Refactor proc macros, add more knobs (#2022)Artem Vorotnikov
* Refactor proc macros, add more knobs * make macros work with rt-core
2019-12-25stream: add StreamExt::take_while (#2029)Artem Vorotnikov
2019-12-24chore: move benches to separate crate (#2028)Carl Lerche
This allows the `benches` crate to depend on `tokio` with all feature flags. This is a similar strategy used for `examples`.
2019-12-24rt: coalesce thread-locals used by the runtime (#1925)Gardner Vickers
Previously, thread-locals used by the various drivers were situated with the driver code. This resulted in state being spread out and many thread-locals being required to run a runtime. This PR coalesces the thread-locals into a single struct.
2019-12-24stream: add StreamExt::take (#2025)Artem Vorotnikov
2019-12-23doc: add additional Mutex example (#2019)Stephen Carman
2019-12-22rt: fix storing Runtime in thread-local (#2011)Carl Lerche
Storing a `Runtime` value in a thread-local resulted in a panic due to the inability to access the parker. This fixes the bug by skipping parking if it fails. In general, there isn't much that we can do besides not parking. Fixes #593
2019-12-22doc: fill out `fs` and remove html links (#2015)Carl Lerche
also add an async version of `fs::canonicalize`
2019-12-21time: DelayQueue::len() (#1755)Ruben De Smet
2019-12-21sync: impl `Stream` for broadcast::Receiver (#2012)Bhargav
2019-12-21rt: fix spawn_blocking from spawn_blocking (#2006)Carl Lerche
Nested spawn_blocking calls would result in a panic due to the necessary context not being setup. This patch sets the blocking pool context from within a blocking pool. Fixes #1982
2019-12-21chore: fix formatting, remove old rustfmt.toml (#2007)Artem Vorotnikov
`cargo fmt` has a bug where it does not format modules scoped with feature flags.
2019-12-21doc: fix misleading comment in interval.rsfbucek
2019-12-21dns: provide `lookup_host` function (#1870)David Barsky
`ToSocketAddrs` is a sealed trait pending changes in Rust that will allow defining async trait fns. Until then, `net::lookup_host` is provided as a way to convert a `T: ToSocketAddrs` into `SocketAddr`s.
2019-12-20stream: StreamExt::try_next (#2005)Artem Vorotnikov
2019-12-20stream: filtering utilities (#2001)Artem Vorotnikov
Adds `StreamExt::filter` and `StreamExt::filter_map`.
2019-12-20chore: formatting, docs and clippy (#2000)Artem Vorotnikov
2019-12-19prepare v0.2.6 release (#1995)Carl Lerche
2019-12-19fs: add deprecated fs::File::seek fn (#1991)Carl Lerche
This fixes an API compatibility regression when `AsyncSeek` was added. Fixes: #1989
2019-12-18chore: prepare v0.2.5 release (#1984)Carl Lerche
Also includes: - `tokio-macros` v0.2.1
2019-12-18stream: add `next` and `map` utility fn (#1962)Artem Vorotnikov
Introduces `StreamExt` trait. This trait will be used to add utility functions to make working with streams easier. This patch includes two functions: * `next`: a future returning the item in the stream. * `map`: transform each item in the stream.
2019-12-18sync: encapsulate TryLockError variants (#1980)Carl Lerche
As there is currently only one variant, make the error type an opaque struct.
2019-12-18Improve runtime threading options docsDouman
2019-12-18rt: add configuration for core threads and max threads (#1977)Douman
`num_threads` is deprecated. Instead, `core_threads` and `max_threads` are introduced. `core_threads` specifies the number of "always on" threads used for the async task executor and `max_threads` specifies the maximum number of threads that the runtime may spawn.
2019-12-18sync: add broadcast channel (#1943)Carl Lerche
Adds a broadcast channel implementation. A broadcast channel is a multi-producer, multi-consumer channel where each consumer receives a clone of every value sent. This is useful for implementing pub / sub style patterns. Implemented as a ring buffer, a Vec of the specified capacity is allocated on initialization of the channel. Values are pushed into slots. When the channel is full, a send overwrites the oldest value. Receivers detect this and return an error on the next call to receive. This prevents unbounded buffering and does not make the channel vulnerable to the slowest consumer. Closes: #1585
2019-12-17sync: add Semaphore (#1973)Michael P. Jung
Provide an asynchronous Semaphore implementation. This is useful for synchronizing concurrent access to a shared resource.
2019-12-17sync: print MutexGuard inner value for debugging (#1961)yim7
2019-12-17rt: fix blocking pool shutdown logic (#1978)Carl Lerche
The blocking task queue was not explicitly drained as part of the blocking pool shutdown logic. It was originally assumed that the contents of the queue would be dropped when the blocking pool structure is dropped. However, tasks must be explicitly shutdown, so we must drain the queue can call `shutdown` on each task. Fixes #1970, #1946
2019-12-17time: impl Stream for DelayQueue (#1975)Ruben De Smet
2019-12-17rt: avoid dropping a task in calls to wake() (#1972)Carl Lerche
Calls to tasks should not be nested. Currently, while a task is being executed and the runtime is shutting down, a call to wake() can result in the wake target to be dropped. This, in turn, results in the drop handler being called. If the user holds a ref cell borrow, a mutex guard, or any such value, dropping the task inline can result in a deadlock. The fix is to permit tasks to be scheduled during the shutdown process and dropping the tasks once they are popped from the queue. Fixes #1929, #1886
2019-12-17docs: correct grammar (#1968)Kelly Thomas Kline
2019-12-14Fix typo in sync documentation (#1942)Vlad-Shcherbina
2019-12-14Enable the `full` feature when compiled for the playground (#1960)Jake Goulding
Closes #1932
2019-12-13time: stream throttle (#1949)Artem Vorotnikov
2019-12-13chore: remove benches and fix/work around clippy lints (#1952)Artem Vorotnikov
2019-12-13Re-enable writev support in TcpStreams (#1956)Sean McArthur
2019-12-11chore: fix the outdated example in README (#1930)nickelc
2019-12-11chore: fix thread_pool benchmarks (#1947)Carl Lerche
Update the rotted thread_pool benchmarks. These benchmarks are not the greatest, but as of now it is all we have for micro benchmarks. Adds a little yielding in the parker as it helps a bit.
2019-12-10io: add AsyncSeek trait (#1924)Michael Howell
Co-authored-by: Taiki Endo <te316e89@gmail.com>
2019-12-10Add Mutex::try_lock and (Unbounded)Receiver::try_recv (#1939)Michael P. Jung
2019-12-10fix spawn function documentation (#1940)Juan Alvarez
2019-12-09sync::Mutex: Fix typo in documentation (#1934)Danilo Bargen
2019-12-09sync::Mutex: Add note about the absence of poisoning (#1933)Danilo Bargen
2019-12-06chore: prepare v0.2.4 release (#1917)Carl Lerche
Includes a `Mutex` bug fix
2019-12-06sync: fix Mutex when lock future dropped before complete (#1902)Michael P. Jung
The bug caused the mutex to reach a state where it is locked and cannot be unlocked. Fixes #1898
2019-12-06doc: expand on runtime / spawn docs (#1914)Carl Lerche
2019-12-06prepare v0.2.3 release (#1912)Carl Lerche
2019-12-06doc: fix TcpListener example to compile (#1911)Carl Lerche
The `process_socket` is hidden from the user which makes the example fail to compile if copied by the reader.
2019-12-06Close markdown (#1910)Jeremy Kolb
2019-12-05time: impl From between std / tokio Instants (#1904)Steven Fackler