1# 0.2.18 (April 12, 2020) 2 3### Fixes 4- task: `LocalSet` was incorrectly marked as `Send` (#2398) 5- io: correctly report `WriteZero` failure in `write_int` (#2334) 6 7# 0.2.17 (April 9, 2020) 8 9### Fixes 10- rt: bug in work-stealing queue (#2387) 11 12### Changes 13- rt: threadpool uses logical CPU count instead of physical by default (#2391) 14 15# 0.2.16 (April 3, 2020) 16 17### Fixes 18 19- sync: fix a regression where `Mutex`, `Semaphore`, and `RwLock` futures no 20 longer implement `Sync` (#2375) 21- fs: fix `fs::copy` not copying file permissions (#2354) 22 23### Added 24 25- time: added `deadline` method to `delay_queue::Expired` (#2300) 26- io: added `StreamReader` (#2052) 27 28# 0.2.15 (April 2, 2020) 29 30### Fixes 31 32- rt: fix queue regression (#2362). 33 34### Added 35 36- sync: Add disarm to `mpsc::Sender` (#2358). 37 38# 0.2.14 (April 1, 2020) 39 40### Fixes 41- rt: concurrency bug in scheduler (#2273). 42- rt: concurrency bug with shell runtime (#2333). 43- test-util: correct pause/resume of time (#2253). 44- time: `DelayQueue` correct wakeup after `insert` (#2285). 45 46### Added 47- io: impl `RawFd`, `AsRawHandle` for std io types (#2335). 48- rt: automatic cooperative task yielding (#2160, #2343, #2349). 49- sync: `RwLock::into_inner` (#2321). 50 51### Changed 52- sync: semaphore, mutex internals rewritten to avoid allocations (#2325). 53 54# 0.2.13 (February 28, 2020) 55 56### Fixes 57- macros: unresolved import in `pin!` (#2281). 58 59# 0.2.12 (February 27, 2020) 60 61### Fixes 62- net: `UnixStream::poll_shutdown` should call `shutdown(Write)` (#2245). 63- process: Wake up read and write on `EPOLLERR` (#2218). 64- rt: potential deadlock when using `block_in_place` and shutting down the 65 runtime (#2119). 66- rt: only detect number of CPUs if `core_threads` not specified (#2238). 67- sync: reduce `watch::Receiver` struct size (#2191). 68- time: succeed when setting delay of `$MAX-1` (#2184). 69- time: avoid having to poll `DelayQueue` after inserting new delay (#2217). 70 71### Added 72- macros: `pin!` variant that assigns to identifier and pins (#2274). 73- net: impl `Stream` for `Listener` types (#2275). 74- rt: `Runtime::shutdown_timeout` waits for runtime to shutdown for specified 75 duration (#2186). 76- stream: `StreamMap` merges streams and can insert / remove streams at 77 runtime (#2185). 78- stream: `StreamExt::skip()` skips a fixed number of items (#2204). 79- stream: `StreamExt::skip_while()` skips items based on a predicate (#2205). 80- sync: `Notify` provides basic `async` / `await` task notification (#2210). 81- sync: `Mutex::into_inner` retrieves guarded data (#2250). 82- sync: `mpsc::Sender::send_timeout` sends, waiting for up to specified duration 83 for channel capacity (#2227). 84- time: impl `Ord` and `Hash` for `Instant` (#2239). 85 86# 0.2.11 (January 27, 2020) 87 88### Fixes 89- docs: misc fixes and tweaks (#2155, #2103, #2027, #2167, #2175). 90- macros: handle generics in `#[tokio::main]` method (#2177). 91- sync: `broadcast` potential lost notifications (#2135). 92- rt: improve "no runtime" panic messages (#2145). 93 94### Added 95- optional support for using `parking_lot` internally (#2164). 96- fs: `fs::copy`, an async version of `std::fs::copy` (#2079). 97- macros: `select!` waits for the first branch to complete (#2152). 98- macros: `join!` waits for all branches to complete (#2158). 99- macros: `try_join!` waits for all branches to complete or the first error (#2169). 100- macros: `pin!` pins a value to the stack (#2163). 101- net: `ReadHalf::poll()` and `ReadHalf::poll_peak` (#2151) 102- stream: `StreamExt::timeout()` sets a per-item max duration (#2149). 103- stream: `StreamExt::fold()` applies a function, producing a single value. (#2122). 104- sync: impl `Eq`, `PartialEq` for `oneshot::RecvError` (#2168). 105- task: methods for inspecting the `JoinError` cause (#2051). 106 107# 0.2.10 (January 21, 2020) 108 109### Fixes 110- `#[tokio::main]` when `rt-core` feature flag is not enabled (#2139). 111- remove `AsyncBufRead` from `BufStream` impl block (#2108). 112- potential undefined behavior when implementing `AsyncRead` incorrectly (#2030). 113 114### Added 115- `BufStream::with_capacity` (#2125). 116- impl `From` and `Default` for `RwLock` (#2089). 117- `io::ReadHalf::is_pair_of` checks if provided `WriteHalf` is for the same 118 underlying object (#1762, #2144). 119- `runtime::Handle::try_current()` returns a handle to the current runtime (#2118). 120- `stream::empty()` returns an immediately ready empty stream (#2092). 121- `stream::once(val)` returns a stream that yields a single value: `val` (#2094). 122- `stream::pending()` returns a stream that never becomes ready (#2092). 123- `StreamExt::chain()` sequences a second stream after the first completes (#2093). 124- `StreamExt::collect()` transform a stream into a collection (#2109). 125- `StreamExt::fuse` ends the stream after the first `None` (#2085). 126- `StreamExt::merge` combines two streams, yielding values as they become ready (#2091). 127- Task-local storage (#2126). 128 129# 0.2.9 (January 9, 2020) 130 131### Fixes 132- `AsyncSeek` impl for `File` (#1986). 133- rt: shutdown deadlock in `threaded_scheduler` (#2074, #2082). 134- rt: memory ordering when dropping `JoinHandle` (#2044). 135- docs: misc API documentation fixes and improvements. 136 137# 0.2.8 (January 7, 2020) 138 139### Fixes 140- depend on new version of `tokio-macros`. 141 142# 0.2.7 (January 7, 2020) 143 144### Fixes 145- potential deadlock when dropping `basic_scheduler` Runtime. 146- calling `spawn_blocking` from within a `spawn_blocking` (#2006). 147- storing a `Runtime` instance in a thread-local (#2011). 148- miscellaneous documentation fixes. 149- rt: fix `Waker::will_wake` to return true when tasks match (#2045). 150- test-util: `time::advance` runs pending tasks before changing the time (#2059). 151 152### Added 153- `net::lookup_host` maps a `T: ToSocketAddrs` to a stream of `SocketAddrs` (#1870). 154- `process::Child` fields are made public to match `std` (#2014). 155- impl `Stream` for `sync::broadcast::Receiver` (#2012). 156- `sync::RwLock` provides an asynchonous read-write lock (#1699). 157- `runtime::Handle::current` returns the handle for the current runtime (#2040). 158- `StreamExt::filter` filters stream values according to a predicate (#2001). 159- `StreamExt::filter_map` simultaneously filter and map stream values (#2001). 160- `StreamExt::try_next` convenience for streams of `Result<T, E>` (#2005). 161- `StreamExt::take` limits a stream to a specified number of values (#2025). 162- `StreamExt::take_while` limits a stream based on a predicate (#2029). 163- `StreamExt::all` tests if every element of the stream matches a predicate (#2035). 164- `StreamExt::any` tests if any element of the stream matches a predicate (#2034). 165- `task::LocalSet.await` runs spawned tasks until the set is idle (#1971). 166- `time::DelayQueue::len` returns the number entries in the queue (#1755). 167- expose runtime options from the `#[tokio::main]` and `#[tokio::test]` (#2022). 168 169# 0.2.6 (December 19, 2019) 170 171### Fixes 172- `fs::File::seek` API regression (#1991). 173 174# 0.2.5 (December 18, 2019) 175 176### Added 177- `io::AsyncSeek` trait (#1924). 178- `Mutex::try_lock` (#1939) 179- `mpsc::Receiver::try_recv` and `mpsc::UnboundedReceiver::try_recv` (#1939). 180- `writev` support for `TcpStream` (#1956). 181- `time::throttle` for throttling streams (#1949). 182- implement `Stream` for `time::DelayQueue` (#1975). 183- `sync::broadcast` provides a fan-out channel (#1943). 184- `sync::Semaphore` provides an async semaphore (#1973). 185- `stream::StreamExt` provides stream utilities (#1962). 186 187### Fixes 188- deadlock risk while shutting down the runtime (#1972). 189- panic while shutting down the runtime (#1978). 190- `sync::MutexGuard` debug output (#1961). 191- misc doc improvements (#1933, #1934, #1940, #1942). 192 193### Changes 194- runtime threads are configured with `runtime::Builder::core_threads` and 195 `runtime::Builder::max_threads`. `runtime::Builder::num_threads` is 196 deprecated (#1977). 197 198# 0.2.4 (December 6, 2019) 199 200### Fixes 201- `sync::Mutex` deadlock when `lock()` future is dropped early (#1898). 202 203# 0.2.3 (December 6, 2019) 204 205### Added 206- read / write integers using `AsyncReadExt` and `AsyncWriteExt` (#1863). 207- `read_buf` / `write_buf` for reading / writing `Buf` / `BufMut` (#1881). 208- `TcpStream::poll_peek` - pollable API for performing TCP peek (#1864). 209- `sync::oneshot::error::TryRecvError` provides variants to detect the error 210 kind (#1874). 211- `LocalSet::block_on` accepts `!'static` task (#1882). 212- `task::JoinError` is now `Sync` (#1888). 213- impl conversions between `tokio::time::Instant` and 214 `std::time::Instant` (#1904). 215 216### Fixes 217- calling `spawn_blocking` after runtime shutdown (#1875). 218- `LocalSet` drop inifinite loop (#1892). 219- `LocalSet` hang under load (#1905). 220- improved documentation (#1865, #1866, #1868, #1874, #1876, #1911). 221 222# 0.2.2 (November 29, 2019) 223 224### Fixes 225- scheduling with `basic_scheduler` (#1861). 226- update `spawn` panic message to specify that a task scheduler is required (#1839). 227- API docs example for `runtime::Builder` to include a task scheduler (#1841). 228- general documentation (#1834). 229- building on illumos/solaris (#1772). 230- panic when dropping `LocalSet` (#1843). 231- API docs mention the required Cargo features for `Builder::{basic, threaded}_scheduler` (#1858). 232 233### Added 234- impl `Stream` for `signal::unix::Signal` (#1849). 235- API docs for platform specific behavior of `signal::ctrl_c` and `signal::unix::Signal` (#1854). 236- API docs for `signal::unix::Signal::{recv, poll_recv}` and `signal::windows::CtrlBreak::{recv, poll_recv}` (#1854). 237- `File::into_std` and `File::try_into_std` methods (#1856). 238 239# 0.2.1 (November 26, 2019) 240 241### Fixes 242- API docs for `TcpListener::incoming`, `UnixListener::incoming` (#1831). 243 244### Added 245- `tokio::task::LocalSet` provides a strategy for spawning `!Send` tasks (#1733). 246- export `tokio::time::Elapsed` (#1826). 247- impl `AsRawFd`, `AsRawHandle` for `tokio::fs::File` (#1827). 248 249# 0.2.0 (November 26, 2019) 250 251A major breaking change. Most implementation and APIs have changed one way or 252another. This changelog entry contains a highlight 253 254### Changed 255- APIs are updated to use `async / await`. 256- most `tokio-*` crates are collapsed into this crate. 257- Scheduler is rewritten. 258- `tokio::spawn` returns a `JoinHandle`. 259- A single I/O / timer is used per runtime. 260- I/O driver uses a concurrent slab for allocating state. 261- components are made available via feature flag. 262- Use `bytes` 0.5 263- `tokio::codec` is moved to `tokio-util`. 264 265### Removed 266- Standalone `timer` and `net` drivers are removed, use `Runtime` instead 267- `current_thread` runtime is removed, use `tokio::runtime::Runtime` with 268 `basic_scheduler` instead. 269 270# 0.1.21 (May 30, 2019) 271 272### Changed 273- Bump `tokio-trace-core` version to 0.2 (#1111). 274 275# 0.1.20 (May 14, 2019) 276 277### Added 278- `tokio::runtime::Builder::panic_handler` allows configuring handling 279 panics on the runtime (#1055). 280 281# 0.1.19 (April 22, 2019) 282 283### Added 284- Re-export `tokio::sync::Mutex` primitive (#964). 285 286# 0.1.18 (March 22, 2019) 287 288### Added 289- `TypedExecutor` re-export and implementations (#993). 290 291# 0.1.17 (March 13, 2019) 292 293### Added 294- Propagate trace subscriber in the runtime (#966). 295 296# 0.1.16 (March 1, 2019) 297 298### Fixed 299- async-await: track latest nightly changes (#940). 300 301### Added 302- `sync::Watch`, a single value broadcast channel (#922). 303- Async equivalent of read / write file helpers being added to `std` (#896). 304 305# 0.1.15 (January 24, 2019) 306 307### Added 308- Re-export tokio-sync APIs (#839). 309- Stream enumerate combinator (#832). 310 311# 0.1.14 (January 6, 2019) 312 313* Use feature flags to break up the crate, allowing users to pick & choose 314 components (#808). 315* Export `UnixDatagram` and `UnixDatagramFramed` (#772). 316 317# 0.1.13 (November 21, 2018) 318 319* Fix `Runtime::reactor()` when no tasks are spawned (#721). 320* `runtime::Builder` no longer uses deprecated methods (#749). 321* Provide `after_start` and `before_stop` configuration settings for 322 `Runtime` (#756). 323* Implement throttle stream combinator (#736). 324 325# 0.1.12 (October 23, 2018) 326 327* runtime: expose `keep_alive` on runtime builder (#676). 328* runtime: create a reactor per worker thread (#660). 329* codec: fix panic in `LengthDelimitedCodec` (#682). 330* io: re-export `tokio_io::io::read` function (#689). 331* runtime: check for executor re-entry in more places (#708). 332 333# 0.1.11 (September 28, 2018) 334 335* Fix `tokio-async-await` dependency (#675). 336 337# 0.1.10 (September 27, 2018) 338 339* Fix minimal versions 340 341# 0.1.9 (September 27, 2018) 342 343* Experimental async/await improvements (#661). 344* Re-export `TaskExecutor` from `tokio-current-thread` (#652). 345* Improve `Runtime` builder API (#645). 346* `tokio::run` panics when called from the context of an executor 347 (#646). 348* Introduce `StreamExt` with a `timeout` helper (#573). 349* Move `length_delimited` into `tokio` (#575). 350* Re-organize `tokio::net` module (#548). 351* Re-export `tokio-current-thread::spawn` in current_thread runtime 352 (#579). 353 354# 0.1.8 (August 23, 2018) 355 356* Extract tokio::executor::current_thread to a sub crate (#370) 357* Add `Runtime::block_on` (#398) 358* Add `runtime::current_thread::block_on_all` (#477) 359* Misc documentation improvements (#450) 360* Implement `std::error::Error` for error types (#501) 361 362# 0.1.7 (June 6, 2018) 363 364* Add `Runtime::block_on` for concurrent runtime (#391). 365* Provide handle to `current_thread::Runtime` that allows spawning tasks from 366 other threads (#340). 367* Provide `clock::now()`, a configurable source of time (#381). 368 369# 0.1.6 (May 2, 2018) 370 371* Add asynchronous filesystem APIs (#323). 372* Add "current thread" runtime variant (#308). 373* `CurrentThread`: Expose inner `Park` instance. 374* Improve fairness of `CurrentThread` executor (#313). 375 376# 0.1.5 (March 30, 2018) 377 378* Provide timer API (#266) 379 380# 0.1.4 (March 22, 2018) 381 382* Fix build on FreeBSD (#218) 383* Shutdown the Runtime when the handle is dropped (#214) 384* Set Runtime thread name prefix for worker threads (#232) 385* Add builder for Runtime (#234) 386* Extract TCP and UDP types into separate crates (#224) 387* Optionally support futures 0.2. 388 389# 0.1.3 (March 09, 2018) 390 391* Fix `CurrentThread::turn` to block on idle (#212). 392 393# 0.1.2 (March 09, 2018) 394 395* Introduce Tokio Runtime (#141) 396* Provide `CurrentThread` for more flexible usage of current thread executor (#141). 397* Add Lio for platforms that support it (#142). 398* I/O resources now lazily bind to the reactor (#160). 399* Extract Reactor to dedicated crate (#169) 400* Add facade to sub crates and add prelude (#166). 401* Switch TCP/UDP fns to poll_ -> Poll<...> style (#175) 402 403# 0.1.1 (February 09, 2018) 404 405* Doc fixes 406 407# 0.1.0 (February 07, 2018) 408 409* Initial crate released based on [RFC](https://github.com/tokio-rs/tokio-rfcs/pull/3). 410