1# 1.5.0 (April 12, 2021) 2 3### Added 4 5- io: add `AsyncSeekExt::stream_position` ([#3650]) 6- io: add `AsyncWriteExt::write_vectored` ([#3678]) 7- io: add a `copy_bidirectional` utility ([#3572]) 8- net: implement `IntoRawFd` for `TcpSocket` ([#3684]) 9- sync: add `OnceCell` ([#3591]) 10- sync: add `OwnedRwLockReadGuard` and `OwnedRwLockWriteGuard` ([#3340]) 11- sync: add `Semaphore::is_closed` ([#3673]) 12- sync: add `mpsc::Sender::capacity` ([#3690]) 13- sync: allow configuring `RwLock` max reads ([#3644]) 14- task: add `sync_scope` for `LocalKey` ([#3612]) 15 16### Fixed 17 18- chore: try to avoid `noalias` attributes on intrusive linked list ([#3654]) 19- rt: fix panic in `JoinHandle::abort()` when called from other threads ([#3672]) 20- sync: don't panic in `oneshot::try_recv` ([#3674]) 21- sync: fix notifications getting dropped on receiver drop ([#3652]) 22 23### Documented 24 25- io: clarify requirements of `AsyncFd` ([#3635]) 26- runtime: fix unclear docs for `{Handle,Runtime}::block_on` ([#3628]) 27- sync: document that `Semaphore` is fair ([#3693]) 28- sync: improve doc on blocking mutex ([#3645]) 29 30[#3340]: https://github.com/tokio-rs/tokio/pull/3340 31[#3572]: https://github.com/tokio-rs/tokio/pull/3572 32[#3591]: https://github.com/tokio-rs/tokio/pull/3591 33[#3612]: https://github.com/tokio-rs/tokio/pull/3612 34[#3628]: https://github.com/tokio-rs/tokio/pull/3628 35[#3635]: https://github.com/tokio-rs/tokio/pull/3635 36[#3644]: https://github.com/tokio-rs/tokio/pull/3644 37[#3645]: https://github.com/tokio-rs/tokio/pull/3645 38[#3650]: https://github.com/tokio-rs/tokio/pull/3650 39[#3652]: https://github.com/tokio-rs/tokio/pull/3652 40[#3654]: https://github.com/tokio-rs/tokio/pull/3654 41[#3672]: https://github.com/tokio-rs/tokio/pull/3672 42[#3673]: https://github.com/tokio-rs/tokio/pull/3673 43[#3674]: https://github.com/tokio-rs/tokio/pull/3674 44[#3678]: https://github.com/tokio-rs/tokio/pull/3678 45[#3684]: https://github.com/tokio-rs/tokio/pull/3684 46[#3690]: https://github.com/tokio-rs/tokio/pull/3690 47[#3693]: https://github.com/tokio-rs/tokio/pull/3693 48 49# 1.4.0 (March 20, 2021) 50 51### Added 52 53- macros: introduce biased argument for `select!` ([#3603]) 54- runtime: add `Handle::block_on` ([#3569]) 55 56### Fixed 57 58- runtime: avoid unnecessary polling of `block_on` future ([#3582]) 59- runtime: fix memory leak/growth when creating many runtimes ([#3564]) 60- runtime: mark `EnterGuard` with `must_use` ([#3609]) 61 62### Documented 63 64- chore: mention fix for building docs in contributing guide ([#3618]) 65- doc: add link to `PollSender` ([#3613]) 66- doc: alias sleep to delay ([#3604]) 67- sync: improve `Mutex` FIFO explanation ([#3615]) 68- timer: fix double newline in module docs ([#3617]) 69 70[#3564]: https://github.com/tokio-rs/tokio/pull/3564 71[#3613]: https://github.com/tokio-rs/tokio/pull/3613 72[#3618]: https://github.com/tokio-rs/tokio/pull/3618 73[#3617]: https://github.com/tokio-rs/tokio/pull/3617 74[#3582]: https://github.com/tokio-rs/tokio/pull/3582 75[#3615]: https://github.com/tokio-rs/tokio/pull/3615 76[#3603]: https://github.com/tokio-rs/tokio/pull/3603 77[#3609]: https://github.com/tokio-rs/tokio/pull/3609 78[#3604]: https://github.com/tokio-rs/tokio/pull/3604 79[#3569]: https://github.com/tokio-rs/tokio/pull/3569 80 81# 1.3.0 (March 9, 2021) 82 83### Added 84 85- coop: expose an `unconstrained()` opt-out ([#3547]) 86- net: add `into_std` for net types without it ([#3509]) 87- sync: add `same_channel` method to `mpsc::Sender` ([#3532]) 88- sync: add `{try_,}acquire_many_owned` to `Semaphore` ([#3535]) 89- sync: add back `RwLockWriteGuard::map` and `RwLockWriteGuard::try_map` ([#3348]) 90 91### Fixed 92 93- sync: allow `oneshot::Receiver::close` after successful `try_recv` ([#3552]) 94- time: do not panic on `timeout(Duration::MAX)` ([#3551]) 95 96### Documented 97 98- doc: doc aliases for pre-1.0 function names ([#3523]) 99- io: fix typos ([#3541]) 100- io: note the EOF behaviour of `read_until` ([#3536]) 101- io: update `AsyncRead::poll_read` doc ([#3557]) 102- net: update `UdpSocket` splitting doc ([#3517]) 103- runtime: add link to `LocalSet` on `new_current_thread` ([#3508]) 104- runtime: update documentation of thread limits ([#3527]) 105- sync: do not recommend `join_all` for `Barrier` ([#3514]) 106- sync: documentation for `oneshot` ([#3592]) 107- sync: rename `notify` to `notify_one` ([#3526]) 108- time: fix typo in `Sleep` doc ([#3515]) 109- time: sync `interval.rs` and `time/mod.rs` docs ([#3533]) 110 111[#3348]: https://github.com/tokio-rs/tokio/pull/3348 112[#3508]: https://github.com/tokio-rs/tokio/pull/3508 113[#3509]: https://github.com/tokio-rs/tokio/pull/3509 114[#3514]: https://github.com/tokio-rs/tokio/pull/3514 115[#3515]: https://github.com/tokio-rs/tokio/pull/3515 116[#3517]: https://github.com/tokio-rs/tokio/pull/3517 117[#3523]: https://github.com/tokio-rs/tokio/pull/3523 118[#3526]: https://github.com/tokio-rs/tokio/pull/3526 119[#3527]: https://github.com/tokio-rs/tokio/pull/3527 120[#3532]: https://github.com/tokio-rs/tokio/pull/3532 121[#3533]: https://github.com/tokio-rs/tokio/pull/3533 122[#3535]: https://github.com/tokio-rs/tokio/pull/3535 123[#3536]: https://github.com/tokio-rs/tokio/pull/3536 124[#3541]: https://github.com/tokio-rs/tokio/pull/3541 125[#3547]: https://github.com/tokio-rs/tokio/pull/3547 126[#3551]: https://github.com/tokio-rs/tokio/pull/3551 127[#3552]: https://github.com/tokio-rs/tokio/pull/3552 128[#3557]: https://github.com/tokio-rs/tokio/pull/3557 129[#3592]: https://github.com/tokio-rs/tokio/pull/3592 130 131# 1.2.0 (February 5, 2021) 132 133### Added 134 135- signal: make `Signal::poll_recv` method public ([#3383]) 136 137### Fixed 138 139- time: make `test-util` paused time fully deterministic ([#3492]) 140 141### Documented 142 143- sync: link to new broadcast and watch wrappers ([#3504]) 144 145[#3383]: https://github.com/tokio-rs/tokio/pull/3383 146[#3492]: https://github.com/tokio-rs/tokio/pull/3492 147[#3504]: https://github.com/tokio-rs/tokio/pull/3504 148 149# 1.1.1 (January 29, 2021) 150 151Forward ports 1.0.3 fix. 152 153### Fixed 154- io: memory leak during shutdown ([#3477]). 155 156# 1.1.0 (January 22, 2021) 157 158### Added 159 160- net: add `try_read_buf` and `try_recv_buf` ([#3351]) 161- mpsc: Add `Sender::try_reserve` function ([#3418]) 162- sync: add `RwLock` `try_read` and `try_write` methods ([#3400]) 163- io: add `ReadBuf::inner_mut` ([#3443]) 164 165### Changed 166 167- macros: improve `select!` error message ([#3352]) 168- io: keep track of initialized bytes in `read_to_end` ([#3426]) 169- runtime: consolidate errors for context missing ([#3441]) 170 171### Fixed 172 173- task: wake `LocalSet` on `spawn_local` ([#3369]) 174- sync: fix panic in broadcast::Receiver drop ([#3434]) 175 176### Documented 177- stream: link to new `Stream` wrappers in `tokio-stream` ([#3343]) 178- docs: mention that `test-util` feature is not enabled with full ([#3397]) 179- process: add documentation to process::Child fields ([#3437]) 180- io: clarify `AsyncFd` docs about changes of the inner fd ([#3430]) 181- net: update datagram docs on splitting ([#3448]) 182- time: document that `Sleep` is not `Unpin` ([#3457]) 183- sync: add link to `PollSemaphore` ([#3456]) 184- task: add `LocalSet` example ([#3438]) 185- sync: improve bounded `mpsc` documentation ([#3458]) 186 187[#3343]: https://github.com/tokio-rs/tokio/pull/3343 188[#3351]: https://github.com/tokio-rs/tokio/pull/3351 189[#3352]: https://github.com/tokio-rs/tokio/pull/3352 190[#3369]: https://github.com/tokio-rs/tokio/pull/3369 191[#3397]: https://github.com/tokio-rs/tokio/pull/3397 192[#3400]: https://github.com/tokio-rs/tokio/pull/3400 193[#3418]: https://github.com/tokio-rs/tokio/pull/3418 194[#3426]: https://github.com/tokio-rs/tokio/pull/3426 195[#3430]: https://github.com/tokio-rs/tokio/pull/3430 196[#3434]: https://github.com/tokio-rs/tokio/pull/3434 197[#3437]: https://github.com/tokio-rs/tokio/pull/3437 198[#3438]: https://github.com/tokio-rs/tokio/pull/3438 199[#3441]: https://github.com/tokio-rs/tokio/pull/3441 200[#3443]: https://github.com/tokio-rs/tokio/pull/3443 201[#3448]: https://github.com/tokio-rs/tokio/pull/3448 202[#3456]: https://github.com/tokio-rs/tokio/pull/3456 203[#3457]: https://github.com/tokio-rs/tokio/pull/3457 204[#3458]: https://github.com/tokio-rs/tokio/pull/3458 205 206# 1.0.3 (January 28, 2021) 207 208### Fixed 209- io: memory leak during shutdown ([#3477]). 210 211[#3477]: https://github.com/tokio-rs/tokio/pull/3477 212 213# 1.0.2 (January 14, 2021) 214 215### Fixed 216- io: soundness in `read_to_end` ([#3428]). 217 218[#3428]: https://github.com/tokio-rs/tokio/pull/3428 219 220# 1.0.1 (December 25, 2020) 221 222This release fixes a soundness hole caused by the combination of `RwLockWriteGuard::map` 223and `RwLockWriteGuard::downgrade` by removing the `map` function. This is a breaking 224change, but breaking changes are allowed under our semver policy when they are required 225to fix a soundness hole. (See [this RFC][semver] for more.) 226 227Note that we have chosen not to do a deprecation cycle or similar because Tokio 1.0.0 was 228released two days ago, and therefore the impact should be minimal. 229 230Due to the soundness hole, we have also yanked Tokio version 1.0.0. 231 232### Removed 233 234- sync: remove `RwLockWriteGuard::map` and `RwLockWriteGuard::try_map` ([#3345]) 235 236### Fixed 237 238- docs: remove stream feature from docs ([#3335]) 239 240[semver]: https://github.com/rust-lang/rfcs/blob/master/text/1122-language-semver.md#soundness-changes 241[#3335]: https://github.com/tokio-rs/tokio/pull/3335 242[#3345]: https://github.com/tokio-rs/tokio/pull/3345 243 244# 1.0.0 (December 23, 2020) 245 246Commit to the API and long-term support. 247 248### Fixed 249 250- sync: spurious wakeup in `watch` ([#3234]). 251 252### Changed 253 254- io: rename `AsyncFd::with_io()` to `try_io()` ([#3306]) 255- fs: avoid OS specific `*Ext` traits in favor of conditionally defining the fn ([#3264]). 256- fs: `Sleep` is `!Unpin` ([#3278]). 257- net: pass `SocketAddr` by value ([#3125]). 258- net: `TcpStream::poll_peek` takes `ReadBuf` ([#3259]). 259- rt: rename `runtime::Builder::max_threads()` to `max_blocking_threads()` ([#3287]). 260- time: require `current_thread` runtime when calling `time::pause()` ([#3289]). 261 262### Removed 263 264- remove `tokio::prelude` ([#3299]). 265- io: remove `AsyncFd::with_poll()` ([#3306]). 266- net: remove `{Tcp,Unix}Stream::shutdown()` in favor of `AsyncWrite::shutdown()` ([#3298]). 267- stream: move all stream utilities to `tokio-stream` until `Stream` is added to 268 `std` ([#3277]). 269- sync: mpsc `try_recv()` due to unexpected behavior ([#3263]). 270- tracing: make unstable as `tracing-core` is not 1.0 yet ([#3266]). 271 272### Added 273 274- fs: `poll_*` fns to `DirEntry` ([#3308]). 275- io: `poll_*` fns to `io::Lines`, `io::Split` ([#3308]). 276- io: `_mut` method variants to `AsyncFd` ([#3304]). 277- net: `poll_*` fns to `UnixDatagram` ([#3223]). 278- net: `UnixStream` readiness and non-blocking ops ([#3246]). 279- sync: `UnboundedReceiver::blocking_recv()` ([#3262]). 280- sync: `watch::Sender::borrow()` ([#3269]). 281- sync: `Semaphore::close()` ([#3065]). 282- sync: `poll_recv` fns to `mpsc::Receiver`, `mpsc::UnboundedReceiver` ([#3308]). 283- time: `poll_tick` fn to `time::Interval` ([#3316]). 284 285[#3065]: https://github.com/tokio-rs/tokio/pull/3065 286[#3125]: https://github.com/tokio-rs/tokio/pull/3125 287[#3223]: https://github.com/tokio-rs/tokio/pull/3223 288[#3234]: https://github.com/tokio-rs/tokio/pull/3234 289[#3246]: https://github.com/tokio-rs/tokio/pull/3246 290[#3259]: https://github.com/tokio-rs/tokio/pull/3259 291[#3262]: https://github.com/tokio-rs/tokio/pull/3262 292[#3263]: https://github.com/tokio-rs/tokio/pull/3263 293[#3264]: https://github.com/tokio-rs/tokio/pull/3264 294[#3266]: https://github.com/tokio-rs/tokio/pull/3266 295[#3269]: https://github.com/tokio-rs/tokio/pull/3269 296[#3277]: https://github.com/tokio-rs/tokio/pull/3277 297[#3278]: https://github.com/tokio-rs/tokio/pull/3278 298[#3287]: https://github.com/tokio-rs/tokio/pull/3287 299[#3289]: https://github.com/tokio-rs/tokio/pull/3289 300[#3298]: https://github.com/tokio-rs/tokio/pull/3298 301[#3299]: https://github.com/tokio-rs/tokio/pull/3299 302[#3304]: https://github.com/tokio-rs/tokio/pull/3304 303[#3306]: https://github.com/tokio-rs/tokio/pull/3306 304[#3308]: https://github.com/tokio-rs/tokio/pull/3308 305[#3316]: https://github.com/tokio-rs/tokio/pull/3316 306 307# 0.3.6 (December 14, 2020) 308 309### Fixed 310 311- rt: fix deadlock in shutdown ([#3228]) 312- rt: fix panic in task abort when off rt ([#3159]) 313- sync: make `add_permits` panic with usize::MAX >> 3 permits ([#3188]) 314- time: Fix race condition in timer drop ([#3229]) 315- watch: fix spurious wakeup ([#3244]) 316 317### Added 318 319- example: add back udp-codec example ([#3205]) 320- net: add `TcpStream::into_std` ([#3189]) 321 322[#3159]: https://github.com/tokio-rs/tokio/pull/3159 323[#3188]: https://github.com/tokio-rs/tokio/pull/3188 324[#3189]: https://github.com/tokio-rs/tokio/pull/3189 325[#3205]: https://github.com/tokio-rs/tokio/pull/3205 326[#3228]: https://github.com/tokio-rs/tokio/pull/3228 327[#3229]: https://github.com/tokio-rs/tokio/pull/3229 328[#3244]: https://github.com/tokio-rs/tokio/pull/3244 329 330# 0.3.5 (November 30, 2020) 331 332### Fixed 333 334- rt: fix `shutdown_timeout(0)` ([#3196]). 335- time: fixed race condition with small sleeps ([#3069]). 336 337### Added 338 339- io: `AsyncFd::with_interest()` ([#3167]). 340- signal: `CtrlC` stream on windows ([#3186]). 341 342[#3069]: https://github.com/tokio-rs/tokio/pull/3069 343[#3167]: https://github.com/tokio-rs/tokio/pull/3167 344[#3186]: https://github.com/tokio-rs/tokio/pull/3186 345[#3196]: https://github.com/tokio-rs/tokio/pull/3196 346 347# 0.3.4 (November 18, 2020) 348 349### Fixed 350 351- stream: `StreamMap` `Default` impl bound ([#3093]). 352- io: `AsyncFd::into_inner()` should deregister the FD ([#3104]). 353 354### Changed 355 356- meta: `parking_lot` feature enabled with `full` ([#3119]). 357 358### Added 359 360- io: `AsyncWrite` vectored writes ([#3149]). 361- net: TCP/UDP readiness and non-blocking ops ([#3130], [#2743], [#3138]). 362- net: TCP socket option (linger, send/recv buf size) ([#3145], [#3143]). 363- net: PID field in `UCred` with solaris/illumos ([#3085]). 364- rt: `runtime::Handle` allows spawning onto a runtime ([#3079]). 365- sync: `Notify::notify_waiters()` ([#3098]). 366- sync: `acquire_many()`, `try_acquire_many()` to `Semaphore` ([#3067]). 367 368[#2743]: https://github.com/tokio-rs/tokio/pull/2743 369[#3067]: https://github.com/tokio-rs/tokio/pull/3067 370[#3079]: https://github.com/tokio-rs/tokio/pull/3079 371[#3085]: https://github.com/tokio-rs/tokio/pull/3085 372[#3093]: https://github.com/tokio-rs/tokio/pull/3093 373[#3098]: https://github.com/tokio-rs/tokio/pull/3098 374[#3104]: https://github.com/tokio-rs/tokio/pull/3104 375[#3119]: https://github.com/tokio-rs/tokio/pull/3119 376[#3130]: https://github.com/tokio-rs/tokio/pull/3130 377[#3138]: https://github.com/tokio-rs/tokio/pull/3138 378[#3143]: https://github.com/tokio-rs/tokio/pull/3143 379[#3145]: https://github.com/tokio-rs/tokio/pull/3145 380[#3149]: https://github.com/tokio-rs/tokio/pull/3149 381 382# 0.3.3 (November 2, 2020) 383 384Fixes a soundness hole by adding a missing `Send` bound to 385`Runtime::spawn_blocking()`. 386 387### Fixed 388 389- rt: include missing `Send`, fixing soundness hole ([#3089]). 390- tracing: avoid huge trace span names ([#3074]). 391 392### Added 393 394- net: `TcpSocket::reuseport()`, `TcpSocket::set_reuseport()` ([#3083]). 395- net: `TcpSocket::reuseaddr()` ([#3093]). 396- net: `TcpSocket::local_addr()` ([#3093]). 397- net: add pid to `UCred` ([#2633]). 398 399[#2633]: https://github.com/tokio-rs/tokio/pull/2633 400[#3074]: https://github.com/tokio-rs/tokio/pull/3074 401[#3083]: https://github.com/tokio-rs/tokio/pull/3083 402[#3089]: https://github.com/tokio-rs/tokio/pull/3089 403[#3093]: https://github.com/tokio-rs/tokio/pull/3093 404 405# 0.3.2 (October 27, 2020) 406 407Adds `AsyncFd` as a replacement for v0.2's `PollEvented`. 408 409### Fixed 410 411- io: fix a potential deadlock when shutting down the I/O driver ([#2903]). 412- sync: `RwLockWriteGuard::downgrade()` bug ([#2957]). 413 414### Added 415 416- io: `AsyncFd` for receiving readiness events on raw FDs ([#2903]). 417- net: `poll_*` function on `UdpSocket` ([#2981]). 418- net: `UdpSocket::take_error()` ([#3051]). 419- sync: `oneshot::Sender::poll_closed()` ([#3032]). 420 421[#2903]: https://github.com/tokio-rs/tokio/pull/2903 422[#2957]: https://github.com/tokio-rs/tokio/pull/2957 423[#2981]: https://github.com/tokio-rs/tokio/pull/2981 424[#3032]: https://github.com/tokio-rs/tokio/pull/3032 425[#3051]: https://github.com/tokio-rs/tokio/pull/3051 426 427# 0.3.1 (October 21, 2020) 428 429This release fixes an use-after-free in the IO driver. Additionally, the `read_buf` 430and `write_buf` methods have been added back to the IO traits, as the bytes crate 431is now on track to reach version 1.0 together with Tokio. 432 433### Fixed 434 435- net: fix use-after-free ([#3019]). 436- fs: ensure buffered data is written on shutdown ([#3009]). 437 438### Added 439 440- io: `copy_buf()` ([#2884]). 441- io: `AsyncReadExt::read_buf()`, `AsyncReadExt::write_buf()` for working with 442 `Buf`/`BufMut` ([#3003]). 443- rt: `Runtime::spawn_blocking()` ([#2980]). 444- sync: `watch::Sender::is_closed()` ([#2991]). 445 446[#2884]: https://github.com/tokio-rs/tokio/pull/2884 447[#2980]: https://github.com/tokio-rs/tokio/pull/2980 448[#2991]: https://github.com/tokio-rs/tokio/pull/2991 449[#3003]: https://github.com/tokio-rs/tokio/pull/3003 450[#3009]: https://github.com/tokio-rs/tokio/pull/3009 451[#3019]: https://github.com/tokio-rs/tokio/pull/3019 452 453# 0.3.0 (October 15, 2020) 454 455This represents a 1.0 beta release. APIs are polished and future-proofed. APIs 456not included for 1.0 stabilization have been removed. 457 458Biggest changes are: 459 460- I/O driver internal rewrite. The windows implementation includes significant 461 changes. 462- Runtime API is polished, especially with how it interacts with feature flag 463 combinations. 464- Feature flags are simplified 465 - `rt-core` and `rt-util` are combined to `rt` 466 - `rt-threaded` is renamed to `rt-multi-thread` to match builder API 467 - `tcp`, `udp`, `uds`, `dns` are combied to `net`. 468 - `parking_lot` is included with `full` 469 470### Changes 471 472- meta: Minimum supported Rust version is now 1.45. 473- io: `AsyncRead` trait now takes `ReadBuf` in order to safely handle reading 474 into uninitialized memory ([#2758]). 475- io: Internal I/O driver storage is now able to compact ([#2757]). 476- rt: `Runtime::block_on` now takes `&self` ([#2782]). 477- sync: `watch` reworked to decouple receiving a change notification from 478 receiving the value ([#2814], [#2806]). 479- sync: `Notify::notify` is renamed to `notify_one` ([#2822]). 480- process: `Child::kill` is now an `async fn` that cleans zombies ([#2823]). 481- sync: use `const fn` constructors as possible ([#2833], [#2790]) 482- signal: reduce cross-thread notification ([#2835]). 483- net: tcp,udp,uds types support operations with `&self` ([#2828], [#2919], [#2934]). 484- sync: blocking `mpsc` channel supports `send` with `&self` ([#2861]). 485- time: rename `delay_for` and `delay_until` to `sleep` and `sleep_until` ([#2826]). 486- io: upgrade to `mio` 0.7 ([#2893]). 487- io: `AsyncSeek` trait is tweaked ([#2885]). 488- fs: `File` operations take `&self` ([#2930]). 489- rt: runtime API, and `#[tokio::main]` macro polish ([#2876]) 490- rt: `Runtime::enter` uses an RAII guard instead of a closure ([#2954]). 491- net: the `from_std` function on all sockets no longer sets socket into non-blocking mode ([#2893]) 492 493### Added 494 495- sync: `map` function to lock guards ([#2445]). 496- sync: `blocking_recv` and `blocking_send` fns to `mpsc` for use outside of Tokio ([#2685]). 497- rt: `Builder::thread_name_fn` for configuring thread names ([#1921]). 498- fs: impl `FromRawFd` and `FromRawHandle` for `File` ([#2792]). 499- process: `Child::wait` and `Child::try_wait` ([#2796]). 500- rt: support configuring thread keep-alive duration ([#2809]). 501- rt: `task::JoinHandle::abort` forcibly cancels a spawned task ([#2474]). 502- sync: `RwLock` write guard to read guard downgrading ([#2733]). 503- net: add `poll_*` functions that take `&self` to all net types ([#2845]) 504- sync: `get_mut()` for `Mutex`, `RwLock` ([#2856]). 505- sync: `mpsc::Sender::closed()` waits for `Receiver` half to close ([#2840]). 506- sync: `mpsc::Sender::is_closed()` returns true if `Receiver` half is closed ([#2726]). 507- stream: `iter` and `iter_mut` to `StreamMap` ([#2890]). 508- net: implement `AsRawSocket` on windows ([#2911]). 509- net: `TcpSocket` creates a socket without binding or listening ([#2920]). 510 511### Removed 512 513- io: vectored ops are removed from `AsyncRead`, `AsyncWrite` traits ([#2882]). 514- io: `mio` is removed from the public API. `PollEvented` and` Registration` are 515 removed ([#2893]). 516- io: remove `bytes` from public API. `Buf` and `BufMut` implementation are 517 removed ([#2908]). 518- time: `DelayQueue` is moved to `tokio-util` ([#2897]). 519 520### Fixed 521 522- io: `stdout` and `stderr` buffering on windows ([#2734]). 523 524[#1921]: https://github.com/tokio-rs/tokio/pull/1921 525[#2445]: https://github.com/tokio-rs/tokio/pull/2445 526[#2474]: https://github.com/tokio-rs/tokio/pull/2474 527[#2685]: https://github.com/tokio-rs/tokio/pull/2685 528[#2726]: https://github.com/tokio-rs/tokio/pull/2726 529[#2733]: https://github.com/tokio-rs/tokio/pull/2733 530[#2734]: https://github.com/tokio-rs/tokio/pull/2734 531[#2757]: https://github.com/tokio-rs/tokio/pull/2757 532[#2758]: https://github.com/tokio-rs/tokio/pull/2758 533[#2782]: https://github.com/tokio-rs/tokio/pull/2782 534[#2790]: https://github.com/tokio-rs/tokio/pull/2790 535[#2792]: https://github.com/tokio-rs/tokio/pull/2792 536[#2796]: https://github.com/tokio-rs/tokio/pull/2796 537[#2806]: https://github.com/tokio-rs/tokio/pull/2806 538[#2809]: https://github.com/tokio-rs/tokio/pull/2809 539[#2814]: https://github.com/tokio-rs/tokio/pull/2814 540[#2822]: https://github.com/tokio-rs/tokio/pull/2822 541[#2823]: https://github.com/tokio-rs/tokio/pull/2823 542[#2826]: https://github.com/tokio-rs/tokio/pull/2826 543[#2828]: https://github.com/tokio-rs/tokio/pull/2828 544[#2833]: https://github.com/tokio-rs/tokio/pull/2833 545[#2835]: https://github.com/tokio-rs/tokio/pull/2835 546[#2840]: https://github.com/tokio-rs/tokio/pull/2840 547[#2845]: https://github.com/tokio-rs/tokio/pull/2845 548[#2856]: https://github.com/tokio-rs/tokio/pull/2856 549[#2861]: https://github.com/tokio-rs/tokio/pull/2861 550[#2876]: https://github.com/tokio-rs/tokio/pull/2876 551[#2882]: https://github.com/tokio-rs/tokio/pull/2882 552[#2885]: https://github.com/tokio-rs/tokio/pull/2885 553[#2890]: https://github.com/tokio-rs/tokio/pull/2890 554[#2893]: https://github.com/tokio-rs/tokio/pull/2893 555[#2897]: https://github.com/tokio-rs/tokio/pull/2897 556[#2908]: https://github.com/tokio-rs/tokio/pull/2908 557[#2911]: https://github.com/tokio-rs/tokio/pull/2911 558[#2919]: https://github.com/tokio-rs/tokio/pull/2919 559[#2920]: https://github.com/tokio-rs/tokio/pull/2920 560[#2930]: https://github.com/tokio-rs/tokio/pull/2930 561[#2934]: https://github.com/tokio-rs/tokio/pull/2934 562[#2954]: https://github.com/tokio-rs/tokio/pull/2954 563 564# 0.2.22 (July 21, 2020) 565 566### Fixes 567 568- docs: misc improvements ([#2572], [#2658], [#2663], [#2656], [#2647], [#2630], [#2487], [#2621], 569 [#2624], [#2600], [#2623], [#2622], [#2577], [#2569], [#2589], [#2575], [#2540], [#2564], [#2567], 570 [#2520], [#2521], [#2493]) 571- rt: allow calls to `block_on` inside calls to `block_in_place` that are 572 themselves inside `block_on` ([#2645]) 573- net: fix non-portable behavior when dropping `TcpStream` `OwnedWriteHalf` ([#2597]) 574- io: improve stack usage by allocating large buffers on directly on the heap 575 ([#2634]) 576- io: fix unsound pin projection in `AsyncReadExt::read_buf` and 577 `AsyncWriteExt::write_buf` ([#2612]) 578- io: fix unnecessary zeroing for `AsyncRead` implementors ([#2525]) 579- io: Fix `BufReader` not correctly forwarding `poll_write_buf` ([#2654]) 580- io: fix panic in `AsyncReadExt::read_line` ([#2541]) 581 582### Changes 583 584- coop: returning `Poll::Pending` no longer decrements the task budget ([#2549]) 585 586### Added 587 588- io: little-endian variants of `AsyncReadExt` and `AsyncWriteExt` methods 589 ([#1915]) 590- task: add [`tracing`] instrumentation to spawned tasks ([#2655]) 591- sync: allow unsized types in `Mutex` and `RwLock` (via `default` constructors) 592 ([#2615]) 593- net: add `ToSocketAddrs` implementation for `&[SocketAddr]` ([#2604]) 594- fs: add `OpenOptionsExt` for `OpenOptions` ([#2515]) 595- fs: add `DirBuilder` ([#2524]) 596 597[`tracing`]: https://crates.io/crates/tracing 598[#1915]: https://github.com/tokio-rs/tokio/pull/1915 599[#2487]: https://github.com/tokio-rs/tokio/pull/2487 600[#2493]: https://github.com/tokio-rs/tokio/pull/2493 601[#2515]: https://github.com/tokio-rs/tokio/pull/2515 602[#2520]: https://github.com/tokio-rs/tokio/pull/2520 603[#2521]: https://github.com/tokio-rs/tokio/pull/2521 604[#2524]: https://github.com/tokio-rs/tokio/pull/2524 605[#2525]: https://github.com/tokio-rs/tokio/pull/2525 606[#2540]: https://github.com/tokio-rs/tokio/pull/2540 607[#2541]: https://github.com/tokio-rs/tokio/pull/2541 608[#2549]: https://github.com/tokio-rs/tokio/pull/2549 609[#2564]: https://github.com/tokio-rs/tokio/pull/2564 610[#2567]: https://github.com/tokio-rs/tokio/pull/2567 611[#2569]: https://github.com/tokio-rs/tokio/pull/2569 612[#2572]: https://github.com/tokio-rs/tokio/pull/2572 613[#2575]: https://github.com/tokio-rs/tokio/pull/2575 614[#2577]: https://github.com/tokio-rs/tokio/pull/2577 615[#2589]: https://github.com/tokio-rs/tokio/pull/2589 616[#2597]: https://github.com/tokio-rs/tokio/pull/2597 617[#2600]: https://github.com/tokio-rs/tokio/pull/2600 618[#2604]: https://github.com/tokio-rs/tokio/pull/2604 619[#2612]: https://github.com/tokio-rs/tokio/pull/2612 620[#2615]: https://github.com/tokio-rs/tokio/pull/2615 621[#2621]: https://github.com/tokio-rs/tokio/pull/2621 622[#2622]: https://github.com/tokio-rs/tokio/pull/2622 623[#2623]: https://github.com/tokio-rs/tokio/pull/2623 624[#2624]: https://github.com/tokio-rs/tokio/pull/2624 625[#2630]: https://github.com/tokio-rs/tokio/pull/2630 626[#2634]: https://github.com/tokio-rs/tokio/pull/2634 627[#2645]: https://github.com/tokio-rs/tokio/pull/2645 628[#2647]: https://github.com/tokio-rs/tokio/pull/2647 629[#2654]: https://github.com/tokio-rs/tokio/pull/2654 630[#2655]: https://github.com/tokio-rs/tokio/pull/2655 631[#2656]: https://github.com/tokio-rs/tokio/pull/2656 632[#2658]: https://github.com/tokio-rs/tokio/pull/2658 633[#2663]: https://github.com/tokio-rs/tokio/pull/2663 634 635# 0.2.21 (May 13, 2020) 636 637### Fixes 638 639- macros: disambiguate built-in `#[test]` attribute in macro expansion ([#2503]) 640- rt: `LocalSet` and task budgeting ([#2462]). 641- rt: task budgeting with `block_in_place` ([#2502]). 642- sync: release `broadcast` channel memory without sending a value ([#2509]). 643- time: notify when resetting a `Delay` to a time in the past ([#2290]) 644 645### Added 646 647- io: `get_mut`, `get_ref`, and `into_inner` to `Lines` ([#2450]). 648- io: `mio::Ready` argument to `PollEvented` ([#2419]). 649- os: illumos support ([#2486]). 650- rt: `Handle::spawn_blocking` ([#2501]). 651- sync: `OwnedMutexGuard` for `Arc<Mutex<T>>` ([#2455]). 652 653[#2290]: https://github.com/tokio-rs/tokio/pull/2290 654[#2419]: https://github.com/tokio-rs/tokio/pull/2419 655[#2450]: https://github.com/tokio-rs/tokio/pull/2450 656[#2455]: https://github.com/tokio-rs/tokio/pull/2455 657[#2462]: https://github.com/tokio-rs/tokio/pull/2462 658[#2486]: https://github.com/tokio-rs/tokio/pull/2486 659[#2501]: https://github.com/tokio-rs/tokio/pull/2501 660[#2502]: https://github.com/tokio-rs/tokio/pull/2502 661[#2503]: https://github.com/tokio-rs/tokio/pull/2503 662[#2509]: https://github.com/tokio-rs/tokio/pull/2509 663 664# 0.2.20 (April 28, 2020) 665 666### Fixes 667 668- sync: `broadcast` closing the channel no longer requires capacity ([#2448]). 669- rt: regression when configuring runtime with `max_threads` less than number of CPUs ([#2457]). 670 671[#2448]: https://github.com/tokio-rs/tokio/pull/2448 672[#2457]: https://github.com/tokio-rs/tokio/pull/2457 673 674# 0.2.19 (April 24, 2020) 675 676### Fixes 677 678- docs: misc improvements ([#2400], [#2405], [#2414], [#2420], [#2423], [#2426], [#2427], [#2434], [#2436], [#2440]). 679- rt: support `block_in_place` in more contexts ([#2409], [#2410]). 680- stream: no panic in `merge()` and `chain()` when using `size_hint()` ([#2430]). 681- task: include visibility modifier when defining a task-local ([#2416]). 682 683### Added 684 685- rt: `runtime::Handle::block_on` ([#2437]). 686- sync: owned `Semaphore` permit ([#2421]). 687- tcp: owned split ([#2270]). 688 689[#2270]: https://github.com/tokio-rs/tokio/pull/2270 690[#2400]: https://github.com/tokio-rs/tokio/pull/2400 691[#2405]: https://github.com/tokio-rs/tokio/pull/2405 692[#2409]: https://github.com/tokio-rs/tokio/pull/2409 693[#2410]: https://github.com/tokio-rs/tokio/pull/2410 694[#2414]: https://github.com/tokio-rs/tokio/pull/2414 695[#2416]: https://github.com/tokio-rs/tokio/pull/2416 696[#2420]: https://github.com/tokio-rs/tokio/pull/2420 697[#2421]: https://github.com/tokio-rs/tokio/pull/2421 698[#2423]: https://github.com/tokio-rs/tokio/pull/2423 699[#2426]: https://github.com/tokio-rs/tokio/pull/2426 700[#2427]: https://github.com/tokio-rs/tokio/pull/2427 701[#2430]: https://github.com/tokio-rs/tokio/pull/2430 702[#2434]: https://github.com/tokio-rs/tokio/pull/2434 703[#2436]: https://github.com/tokio-rs/tokio/pull/2436 704[#2437]: https://github.com/tokio-rs/tokio/pull/2437 705[#2440]: https://github.com/tokio-rs/tokio/pull/2440 706 707# 0.2.18 (April 12, 2020) 708 709### Fixes 710 711- task: `LocalSet` was incorrectly marked as `Send` ([#2398]) 712- io: correctly report `WriteZero` failure in `write_int` ([#2334]) 713 714[#2334]: https://github.com/tokio-rs/tokio/pull/2334 715[#2398]: https://github.com/tokio-rs/tokio/pull/2398 716 717# 0.2.17 (April 9, 2020) 718 719### Fixes 720 721- rt: bug in work-stealing queue ([#2387]) 722 723### Changes 724 725- rt: threadpool uses logical CPU count instead of physical by default ([#2391]) 726 727[#2387]: https://github.com/tokio-rs/tokio/pull/2387 728[#2391]: https://github.com/tokio-rs/tokio/pull/2391 729 730# 0.2.16 (April 3, 2020) 731 732### Fixes 733 734- sync: fix a regression where `Mutex`, `Semaphore`, and `RwLock` futures no 735 longer implement `Sync` ([#2375]) 736- fs: fix `fs::copy` not copying file permissions ([#2354]) 737 738### Added 739 740- time: added `deadline` method to `delay_queue::Expired` ([#2300]) 741- io: added `StreamReader` ([#2052]) 742 743[#2052]: https://github.com/tokio-rs/tokio/pull/2052 744[#2300]: https://github.com/tokio-rs/tokio/pull/2300 745[#2354]: https://github.com/tokio-rs/tokio/pull/2354 746[#2375]: https://github.com/tokio-rs/tokio/pull/2375 747 748# 0.2.15 (April 2, 2020) 749 750### Fixes 751 752- rt: fix queue regression ([#2362]). 753 754### Added 755 756- sync: Add disarm to `mpsc::Sender` ([#2358]). 757 758[#2358]: https://github.com/tokio-rs/tokio/pull/2358 759[#2362]: https://github.com/tokio-rs/tokio/pull/2362 760 761# 0.2.14 (April 1, 2020) 762 763### Fixes 764 765- rt: concurrency bug in scheduler ([#2273]). 766- rt: concurrency bug with shell runtime ([#2333]). 767- test-util: correct pause/resume of time ([#2253]). 768- time: `DelayQueue` correct wakeup after `insert` ([#2285]). 769 770### Added 771 772- io: impl `RawFd`, `AsRawHandle` for std io types ([#2335]). 773- rt: automatic cooperative task yielding ([#2160], [#2343], [#2349]). 774- sync: `RwLock::into_inner` ([#2321]). 775 776### Changed 777 778- sync: semaphore, mutex internals rewritten to avoid allocations ([#2325]). 779 780[#2160]: https://github.com/tokio-rs/tokio/pull/2160 781[#2253]: https://github.com/tokio-rs/tokio/pull/2253 782[#2273]: https://github.com/tokio-rs/tokio/pull/2273 783[#2285]: https://github.com/tokio-rs/tokio/pull/2285 784[#2321]: https://github.com/tokio-rs/tokio/pull/2321 785[#2325]: https://github.com/tokio-rs/tokio/pull/2325 786[#2333]: https://github.com/tokio-rs/tokio/pull/2333 787[#2335]: https://github.com/tokio-rs/tokio/pull/2335 788[#2343]: https://github.com/tokio-rs/tokio/pull/2343 789[#2349]: https://github.com/tokio-rs/tokio/pull/2349 790 791# 0.2.13 (February 28, 2020) 792 793### Fixes 794 795- macros: unresolved import in `pin!` ([#2281]). 796 797[#2281]: https://github.com/tokio-rs/tokio/pull/2281 798 799# 0.2.12 (February 27, 2020) 800 801### Fixes 802 803- net: `UnixStream::poll_shutdown` should call `shutdown(Write)` ([#2245]). 804- process: Wake up read and write on `EPOLLERR` ([#2218]). 805- rt: potential deadlock when using `block_in_place` and shutting down the 806 runtime ([#2119]). 807- rt: only detect number of CPUs if `core_threads` not specified ([#2238]). 808- sync: reduce `watch::Receiver` struct size ([#2191]). 809- time: succeed when setting delay of `$MAX-1` ([#2184]). 810- time: avoid having to poll `DelayQueue` after inserting new delay ([#2217]). 811 812### Added 813 814- macros: `pin!` variant that assigns to identifier and pins ([#2274]). 815- net: impl `Stream` for `Listener` types ([#2275]). 816- rt: `Runtime::shutdown_timeout` waits for runtime to shutdown for specified 817 duration ([#2186]). 818- stream: `StreamMap` merges streams and can insert / remove streams at 819 runtime ([#2185]). 820- stream: `StreamExt::skip()` skips a fixed number of items ([#2204]). 821- stream: `StreamExt::skip_while()` skips items based on a predicate ([#2205]). 822- sync: `Notify` provides basic `async` / `await` task notification ([#2210]). 823- sync: `Mutex::into_inner` retrieves guarded data ([#2250]). 824- sync: `mpsc::Sender::send_timeout` sends, waiting for up to specified duration 825 for channel capacity ([#2227]). 826- time: impl `Ord` and `Hash` for `Instant` ([#2239]). 827 828[#2119]: https://github.com/tokio-rs/tokio/pull/2119 829[#2184]: https://github.com/tokio-rs/tokio/pull/2184 830[#2185]: https://github.com/tokio-rs/tokio/pull/2185 831[#2186]: https://github.com/tokio-rs/tokio/pull/2186 832[#2191]: https://github.com/tokio-rs/tokio/pull/2191 833[#2204]: https://github.com/tokio-rs/tokio/pull/2204 834[#2205]: https://github.com/tokio-rs/tokio/pull/2205 835[#2210]: https://github.com/tokio-rs/tokio/pull/2210 836[#2217]: https://github.com/tokio-rs/tokio/pull/2217 837[#2218]: https://github.com/tokio-rs/tokio/pull/2218 838[#2227]: https://github.com/tokio-rs/tokio/pull/2227 839[#2238]: https://github.com/tokio-rs/tokio/pull/2238 840[#2239]: https://github.com/tokio-rs/tokio/pull/2239 841[#2245]: https://github.com/tokio-rs/tokio/pull/2245 842[#2250]: https://github.com/tokio-rs/tokio/pull/2250 843[#2274]: https://github.com/tokio-rs/tokio/pull/2274 844[#2275]: https://github.com/tokio-rs/tokio/pull/2275 845 846# 0.2.11 (January 27, 2020) 847 848### Fixes 849 850- docs: misc fixes and tweaks ([#2155], [#2103], [#2027], [#2167], [#2175]). 851- macros: handle generics in `#[tokio::main]` method ([#2177]). 852- sync: `broadcast` potential lost notifications ([#2135]). 853- rt: improve "no runtime" panic messages ([#2145]). 854 855### Added 856 857- optional support for using `parking_lot` internally ([#2164]). 858- fs: `fs::copy`, an async version of `std::fs::copy` ([#2079]). 859- macros: `select!` waits for the first branch to complete ([#2152]). 860- macros: `join!` waits for all branches to complete ([#2158]). 861- macros: `try_join!` waits for all branches to complete or the first error ([#2169]). 862- macros: `pin!` pins a value to the stack ([#2163]). 863- net: `ReadHalf::poll()` and `ReadHalf::poll_peak` ([#2151]) 864- stream: `StreamExt::timeout()` sets a per-item max duration ([#2149]). 865- stream: `StreamExt::fold()` applies a function, producing a single value. ([#2122]). 866- sync: impl `Eq`, `PartialEq` for `oneshot::RecvError` ([#2168]). 867- task: methods for inspecting the `JoinError` cause ([#2051]). 868 869[#2027]: https://github.com/tokio-rs/tokio/pull/2027 870[#2051]: https://github.com/tokio-rs/tokio/pull/2051 871[#2079]: https://github.com/tokio-rs/tokio/pull/2079 872[#2103]: https://github.com/tokio-rs/tokio/pull/2103 873[#2122]: https://github.com/tokio-rs/tokio/pull/2122 874[#2135]: https://github.com/tokio-rs/tokio/pull/2135 875[#2145]: https://github.com/tokio-rs/tokio/pull/2145 876[#2149]: https://github.com/tokio-rs/tokio/pull/2149 877[#2151]: https://github.com/tokio-rs/tokio/pull/2151 878[#2152]: https://github.com/tokio-rs/tokio/pull/2152 879[#2155]: https://github.com/tokio-rs/tokio/pull/2155 880[#2158]: https://github.com/tokio-rs/tokio/pull/2158 881[#2163]: https://github.com/tokio-rs/tokio/pull/2163 882[#2164]: https://github.com/tokio-rs/tokio/pull/2164 883[#2167]: https://github.com/tokio-rs/tokio/pull/2167 884[#2168]: https://github.com/tokio-rs/tokio/pull/2168 885[#2169]: https://github.com/tokio-rs/tokio/pull/2169 886[#2175]: https://github.com/tokio-rs/tokio/pull/2175 887[#2177]: https://github.com/tokio-rs/tokio/pull/2177 888 889# 0.2.10 (January 21, 2020) 890 891### Fixes 892 893- `#[tokio::main]` when `rt-core` feature flag is not enabled ([#2139]). 894- remove `AsyncBufRead` from `BufStream` impl block ([#2108]). 895- potential undefined behavior when implementing `AsyncRead` incorrectly ([#2030]). 896 897### Added 898 899- `BufStream::with_capacity` ([#2125]). 900- impl `From` and `Default` for `RwLock` ([#2089]). 901- `io::ReadHalf::is_pair_of` checks if provided `WriteHalf` is for the same 902 underlying object ([#1762], [#2144]). 903- `runtime::Handle::try_current()` returns a handle to the current runtime ([#2118]). 904- `stream::empty()` returns an immediately ready empty stream ([#2092]). 905- `stream::once(val)` returns a stream that yields a single value: `val` ([#2094]). 906- `stream::pending()` returns a stream that never becomes ready ([#2092]). 907- `StreamExt::chain()` sequences a second stream after the first completes ([#2093]). 908- `StreamExt::collect()` transform a stream into a collection ([#2109]). 909- `StreamExt::fuse` ends the stream after the first `None` ([#2085]). 910- `StreamExt::merge` combines two streams, yielding values as they become ready ([#2091]). 911- Task-local storage ([#2126]). 912 913[#1762]: https://github.com/tokio-rs/tokio/pull/1762 914[#2030]: https://github.com/tokio-rs/tokio/pull/2030 915[#2085]: https://github.com/tokio-rs/tokio/pull/2085 916[#2089]: https://github.com/tokio-rs/tokio/pull/2089 917[#2091]: https://github.com/tokio-rs/tokio/pull/2091 918[#2092]: https://github.com/tokio-rs/tokio/pull/2092 919[#2093]: https://github.com/tokio-rs/tokio/pull/2093 920[#2094]: https://github.com/tokio-rs/tokio/pull/2094 921[#2108]: https://github.com/tokio-rs/tokio/pull/2108 922[#2109]: https://github.com/tokio-rs/tokio/pull/2109 923[#2118]: https://github.com/tokio-rs/tokio/pull/2118 924[#2125]: https://github.com/tokio-rs/tokio/pull/2125 925[#2126]: https://github.com/tokio-rs/tokio/pull/2126 926[#2139]: https://github.com/tokio-rs/tokio/pull/2139 927[#2144]: https://github.com/tokio-rs/tokio/pull/2144 928 929# 0.2.9 (January 9, 2020) 930 931### Fixes 932 933- `AsyncSeek` impl for `File` ([#1986]). 934- rt: shutdown deadlock in `threaded_scheduler` ([#2074], [#2082]). 935- rt: memory ordering when dropping `JoinHandle` ([#2044]). 936- docs: misc API documentation fixes and improvements. 937 938[#1986]: https://github.com/tokio-rs/tokio/pull/1986 939[#2044]: https://github.com/tokio-rs/tokio/pull/2044 940[#2074]: https://github.com/tokio-rs/tokio/pull/2074 941[#2082]: https://github.com/tokio-rs/tokio/pull/2082 942 943# 0.2.8 (January 7, 2020) 944 945### Fixes 946 947- depend on new version of `tokio-macros`. 948 949# 0.2.7 (January 7, 2020) 950 951### Fixes 952 953- potential deadlock when dropping `basic_scheduler` Runtime. 954- calling `spawn_blocking` from within a `spawn_blocking` ([#2006]). 955- storing a `Runtime` instance in a thread-local ([#2011]). 956- miscellaneous documentation fixes. 957- rt: fix `Waker::will_wake` to return true when tasks match ([#2045]). 958- test-util: `time::advance` runs pending tasks before changing the time ([#2059]). 959 960### Added 961 962- `net::lookup_host` maps a `T: ToSocketAddrs` to a stream of `SocketAddrs` ([#1870]). 963- `process::Child` fields are made public to match `std` ([#2014]). 964- impl `Stream` for `sync::broadcast::Receiver` ([#2012]). 965- `sync::RwLock` provides an asynchonous read-write lock ([#1699]). 966- `runtime::Handle::current` returns the handle for the current runtime ([#2040]). 967- `StreamExt::filter` filters stream values according to a predicate ([#2001]). 968- `StreamExt::filter_map` simultaneously filter and map stream values ([#2001]). 969- `StreamExt::try_next` convenience for streams of `Result<T, E>` ([#2005]). 970- `StreamExt::take` limits a stream to a specified number of values ([#2025]). 971- `StreamExt::take_while` limits a stream based on a predicate ([#2029]). 972- `StreamExt::all` tests if every element of the stream matches a predicate ([#2035]). 973- `StreamExt::any` tests if any element of the stream matches a predicate ([#2034]). 974- `task::LocalSet.await` runs spawned tasks until the set is idle ([#1971]). 975- `time::DelayQueue::len` returns the number entries in the queue ([#1755]). 976- expose runtime options from the `#[tokio::main]` and `#[tokio::test]` ([#2022]). 977 978[#1699]: https://github.com/tokio-rs/tokio/pull/1699 979[#1755]: https://github.com/tokio-rs/tokio/pull/1755 980[#1870]: https://github.com/tokio-rs/tokio/pull/1870 981[#1971]: https://github.com/tokio-rs/tokio/pull/1971 982[#2001]: https://github.com/tokio-rs/tokio/pull/2001 983[#2005]: https://github.com/tokio-rs/tokio/pull/2005 984[#2006]: https://github.com/tokio-rs/tokio/pull/2006 985[#2011]: https://github.com/tokio-rs/tokio/pull/2011 986[#2012]: https://github.com/tokio-rs/tokio/pull/2012 987[#2014]: https://github.com/tokio-rs/tokio/pull/2014 988[#2022]: https://github.com/tokio-rs/tokio/pull/2022 989[#2025]: https://github.com/tokio-rs/tokio/pull/2025 990[#2029]: https://github.com/tokio-rs/tokio/pull/2029 991[#2034]: https://github.com/tokio-rs/tokio/pull/2034 992[#2035]: https://github.com/tokio-rs/tokio/pull/2035 993[#2040]: https://github.com/tokio-rs/tokio/pull/2040 994[#2045]: https://github.com/tokio-rs/tokio/pull/2045 995[#2059]: https://github.com/tokio-rs/tokio/pull/2059 996 997# 0.2.6 (December 19, 2019) 998 999### Fixes 1000 1001- `fs::File::seek` API regression ([#1991]). 1002 1003[#1991]: https://github.com/tokio-rs/tokio/pull/1991 1004 1005# 0.2.5 (December 18, 2019) 1006 1007### Added 1008 1009- `io::AsyncSeek` trait ([#1924]). 1010- `Mutex::try_lock` ([#1939]) 1011- `mpsc::Receiver::try_recv` and `mpsc::UnboundedReceiver::try_recv` ([#1939]). 1012- `writev` support for `TcpStream` ([#1956]). 1013- `time::throttle` for throttling streams ([#1949]). 1014- implement `Stream` for `time::DelayQueue` ([#1975]). 1015- `sync::broadcast` provides a fan-out channel ([#1943]). 1016- `sync::Semaphore` provides an async semaphore ([#1973]). 1017- `stream::StreamExt` provides stream utilities ([#1962]). 1018 1019### Fixes 1020 1021- deadlock risk while shutting down the runtime ([#1972]). 1022- panic while shutting down the runtime ([#1978]). 1023- `sync::MutexGuard` debug output ([#1961]). 1024- misc doc improvements ([#1933], [#1934], [#1940], [#1942]). 1025 1026### Changes 1027 1028- runtime threads are configured with `runtime::Builder::core_threads` and 1029 `runtime::Builder::max_threads`. `runtime::Builder::num_threads` is 1030 deprecated ([#1977]). 1031 1032[#1924]: https://github.com/tokio-rs/tokio/pull/1924 1033[#1933]: https://github.com/tokio-rs/tokio/pull/1933 1034[#1934]: https://github.com/tokio-rs/tokio/pull/1934 1035[#1939]: https://github.com/tokio-rs/tokio/pull/1939 1036[#1940]: https://github.com/tokio-rs/tokio/pull/1940 1037[#1942]: https://github.com/tokio-rs/tokio/pull/1942 1038[#1943]: https://github.com/tokio-rs/tokio/pull/1943 1039[#1949]: https://github.com/tokio-rs/tokio/pull/1949 1040[#1956]: https://github.com/tokio-rs/tokio/pull/1956 1041[#1961]: https://github.com/tokio-rs/tokio/pull/1961 1042[#1962]: https://github.com/tokio-rs/tokio/pull/1962 1043[#1972]: https://github.com/tokio-rs/tokio/pull/1972 1044[#1973]: https://github.com/tokio-rs/tokio/pull/1973 1045[#1975]: https://github.com/tokio-rs/tokio/pull/1975 1046[#1977]: https://github.com/tokio-rs/tokio/pull/1977 1047[#1978]: https://github.com/tokio-rs/tokio/pull/1978 1048 1049# 0.2.4 (December 6, 2019) 1050 1051### Fixes 1052 1053- `sync::Mutex` deadlock when `lock()` future is dropped early ([#1898]). 1054 1055[#1898]: https://github.com/tokio-rs/tokio/pull/1898 1056 1057# 0.2.3 (December 6, 2019) 1058 1059### Added 1060 1061- read / write integers using `AsyncReadExt` and `AsyncWriteExt` ([#1863]). 1062- `read_buf` / `write_buf` for reading / writing `Buf` / `BufMut` ([#1881]). 1063- `TcpStream::poll_peek` - pollable API for performing TCP peek ([#1864]). 1064- `sync::oneshot::error::TryRecvError` provides variants to detect the error 1065 kind ([#1874]). 1066- `LocalSet::block_on` accepts `!'static` task ([#1882]). 1067- `task::JoinError` is now `Sync` ([#1888]). 1068- impl conversions between `tokio::time::Instant` and 1069 `std::time::Instant` ([#1904]). 1070 1071### Fixes 1072 1073- calling `spawn_blocking` after runtime shutdown ([#1875]). 1074- `LocalSet` drop inifinite loop ([#1892]). 1075- `LocalSet` hang under load ([#1905]). 1076- improved documentation ([#1865], [#1866], [#1868], [#1874], [#1876], [#1911]). 1077 1078[#1863]: https://github.com/tokio-rs/tokio/pull/1863 1079[#1864]: https://github.com/tokio-rs/tokio/pull/1864 1080[#1865]: https://github.com/tokio-rs/tokio/pull/1865 1081[#1866]: https://github.com/tokio-rs/tokio/pull/1866 1082[#1868]: https://github.com/tokio-rs/tokio/pull/1868 1083[#1874]: https://github.com/tokio-rs/tokio/pull/1874 1084[#1875]: https://github.com/tokio-rs/tokio/pull/1875 1085[#1876]: https://github.com/tokio-rs/tokio/pull/1876 1086[#1881]: https://github.com/tokio-rs/tokio/pull/1881 1087[#1882]: https://github.com/tokio-rs/tokio/pull/1882 1088[#1888]: https://github.com/tokio-rs/tokio/pull/1888 1089[#1892]: https://github.com/tokio-rs/tokio/pull/1892 1090[#1904]: https://github.com/tokio-rs/tokio/pull/1904 1091[#1905]: https://github.com/tokio-rs/tokio/pull/1905 1092[#1911]: https://github.com/tokio-rs/tokio/pull/1911 1093 1094# 0.2.2 (November 29, 2019) 1095 1096### Fixes 1097 1098- scheduling with `basic_scheduler` ([#1861]). 1099- update `spawn` panic message to specify that a task scheduler is required ([#1839]). 1100- API docs example for `runtime::Builder` to include a task scheduler ([#1841]). 1101- general documentation ([#1834]). 1102- building on illumos/solaris ([#1772]). 1103- panic when dropping `LocalSet` ([#1843]). 1104- API docs mention the required Cargo features for `Builder::{basic, threaded}_scheduler` ([#1858]). 1105 1106### Added 1107 1108- impl `Stream` for `signal::unix::Signal` ([#1849]). 1109- API docs for platform specific behavior of `signal::ctrl_c` and `signal::unix::Signal` ([#1854]). 1110- API docs for `signal::unix::Signal::{recv, poll_recv}` and `signal::windows::CtrlBreak::{recv, poll_recv}` ([#1854]). 1111- `File::into_std` and `File::try_into_std` methods ([#1856]). 1112 1113[#1772]: https://github.com/tokio-rs/tokio/pull/1772 1114[#1834]: https://github.com/tokio-rs/tokio/pull/1834 1115[#1839]: https://github.com/tokio-rs/tokio/pull/1839 1116[#1841]: https://github.com/tokio-rs/tokio/pull/1841 1117[#1843]: https://github.com/tokio-rs/tokio/pull/1843 1118[#1849]: https://github.com/tokio-rs/tokio/pull/1849 1119[#1854]: https://github.com/tokio-rs/tokio/pull/1854 1120[#1856]: https://github.com/tokio-rs/tokio/pull/1856 1121[#1858]: https://github.com/tokio-rs/tokio/pull/1858 1122[#1861]: https://github.com/tokio-rs/tokio/pull/1861 1123 1124# 0.2.1 (November 26, 2019) 1125 1126### Fixes 1127 1128- API docs for `TcpListener::incoming`, `UnixListener::incoming` ([#1831]). 1129 1130### Added 1131 1132- `tokio::task::LocalSet` provides a strategy for spawning `!Send` tasks ([#1733]). 1133- export `tokio::time::Elapsed` ([#1826]). 1134- impl `AsRawFd`, `AsRawHandle` for `tokio::fs::File` ([#1827]). 1135 1136[#1733]: https://github.com/tokio-rs/tokio/pull/1733 1137[#1826]: https://github.com/tokio-rs/tokio/pull/1826 1138[#1827]: https://github.com/tokio-rs/tokio/pull/1827 1139[#1831]: https://github.com/tokio-rs/tokio/pull/1831 1140 1141# 0.2.0 (November 26, 2019) 1142 1143A major breaking change. Most implementation and APIs have changed one way or 1144another. This changelog entry contains a highlight 1145 1146### Changed 1147 1148- APIs are updated to use `async / await`. 1149- most `tokio-*` crates are collapsed into this crate. 1150- Scheduler is rewritten. 1151- `tokio::spawn` returns a `JoinHandle`. 1152- A single I/O / timer is used per runtime. 1153- I/O driver uses a concurrent slab for allocating state. 1154- components are made available via feature flag. 1155- Use `bytes` 0.5 1156- `tokio::codec` is moved to `tokio-util`. 1157 1158### Removed 1159 1160- Standalone `timer` and `net` drivers are removed, use `Runtime` instead 1161- `current_thread` runtime is removed, use `tokio::runtime::Runtime` with 1162 `basic_scheduler` instead. 1163 1164# 0.1.21 (May 30, 2019) 1165 1166### Changed 1167 1168- Bump `tokio-trace-core` version to 0.2 ([#1111]). 1169 1170[#1111]: https://github.com/tokio-rs/tokio/pull/1111 1171 1172# 0.1.20 (May 14, 2019) 1173 1174### Added 1175 1176- `tokio::runtime::Builder::panic_handler` allows configuring handling 1177 panics on the runtime ([#1055]). 1178 1179[#1055]: https://github.com/tokio-rs/tokio/pull/1055 1180 1181# 0.1.19 (April 22, 2019) 1182 1183### Added 1184 1185- Re-export `tokio::sync::Mutex` primitive ([#964]). 1186 1187[#964]: https://github.com/tokio-rs/tokio/pull/964 1188 1189# 0.1.18 (March 22, 2019) 1190 1191### Added 1192 1193- `TypedExecutor` re-export and implementations ([#993]). 1194 1195[#993]: https://github.com/tokio-rs/tokio/pull/993 1196 1197# 0.1.17 (March 13, 2019) 1198 1199### Added 1200 1201- Propagate trace subscriber in the runtime ([#966]). 1202 1203[#966]: https://github.com/tokio-rs/tokio/pull/966 1204 1205# 0.1.16 (March 1, 2019) 1206 1207### Fixed 1208 1209- async-await: track latest nightly changes ([#940]). 1210 1211### Added 1212 1213- `sync::Watch`, a single value broadcast channel ([#922]). 1214- Async equivalent of read / write file helpers being added to `std` ([#896]). 1215 1216[#896]: https://github.com/tokio-rs/tokio/pull/896 1217[#922]: https://github.com/tokio-rs/tokio/pull/922 1218[#940]: https://github.com/tokio-rs/tokio/pull/940 1219 1220# 0.1.15 (January 24, 2019) 1221 1222### Added 1223 1224- Re-export tokio-sync APIs ([#839]). 1225- Stream enumerate combinator ([#832]). 1226 1227[#832]: https://github.com/tokio-rs/tokio/pull/832 1228[#839]: https://github.com/tokio-rs/tokio/pull/839 1229 1230# 0.1.14 (January 6, 2019) 1231 1232- Use feature flags to break up the crate, allowing users to pick & choose 1233 components ([#808]). 1234- Export `UnixDatagram` and `UnixDatagramFramed` ([#772]). 1235 1236[#772]: https://github.com/tokio-rs/tokio/pull/772 1237[#808]: https://github.com/tokio-rs/tokio/pull/808 1238 1239# 0.1.13 (November 21, 2018) 1240 1241- Fix `Runtime::reactor()` when no tasks are spawned ([#721]). 1242- `runtime::Builder` no longer uses deprecated methods ([#749]). 1243- Provide `after_start` and `before_stop` configuration settings for 1244 `Runtime` ([#756]). 1245- Implement throttle stream combinator ([#736]). 1246 1247[#721]: https://github.com/tokio-rs/tokio/pull/721 1248[#736]: https://github.com/tokio-rs/tokio/pull/736 1249[#749]: https://github.com/tokio-rs/tokio/pull/749 1250[#756]: https://github.com/tokio-rs/tokio/pull/756 1251 1252# 0.1.12 (October 23, 2018) 1253 1254- runtime: expose `keep_alive` on runtime builder ([#676]). 1255- runtime: create a reactor per worker thread ([#660]). 1256- codec: fix panic in `LengthDelimitedCodec` ([#682]). 1257- io: re-export `tokio_io::io::read` function ([#689]). 1258- runtime: check for executor re-entry in more places ([#708]). 1259 1260[#660]: https://github.com/tokio-rs/tokio/pull/660 1261[#676]: https://github.com/tokio-rs/tokio/pull/676 1262[#682]: https://github.com/tokio-rs/tokio/pull/682 1263[#689]: https://github.com/tokio-rs/tokio/pull/689 1264[#708]: https://github.com/tokio-rs/tokio/pull/708 1265 1266# 0.1.11 (September 28, 2018) 1267 1268- Fix `tokio-async-await` dependency ([#675]). 1269 1270[#675]: https://github.com/tokio-rs/tokio/pull/675 1271 1272# 0.1.10 (September 27, 2018) 1273 1274- Fix minimal versions 1275 1276# 0.1.9 (September 27, 2018) 1277 1278- Experimental async/await improvements ([#661]). 1279- Re-export `TaskExecutor` from `tokio-current-thread` ([#652]). 1280- Improve `Runtime` builder API ([#645]). 1281- `tokio::run` panics when called from the context of an executor 1282 ([#646]). 1283- Introduce `StreamExt` with a `timeout` helper ([#573]). 1284- Move `length_delimited` into `tokio` ([#575]). 1285- Re-organize `tokio::net` module ([#548]). 1286- Re-export `tokio-current-thread::spawn` in current_thread runtime 1287 ([#579]). 1288 1289[#548]: https://github.com/tokio-rs/tokio/pull/548 1290[#573]: https://github.com/tokio-rs/tokio/pull/573 1291[#575]: https://github.com/tokio-rs/tokio/pull/575 1292[#579]: https://github.com/tokio-rs/tokio/pull/579 1293[#645]: https://github.com/tokio-rs/tokio/pull/645 1294[#646]: https://github.com/tokio-rs/tokio/pull/646 1295[#652]: https://github.com/tokio-rs/tokio/pull/652 1296[#661]: https://github.com/tokio-rs/tokio/pull/661 1297 1298# 0.1.8 (August 23, 2018) 1299 1300- Extract tokio::executor::current_thread to a sub crate ([#370]) 1301- Add `Runtime::block_on` ([#398]) 1302- Add `runtime::current_thread::block_on_all` ([#477]) 1303- Misc documentation improvements ([#450]) 1304- Implement `std::error::Error` for error types ([#501]) 1305 1306[#370]: https://github.com/tokio-rs/tokio/pull/370 1307[#398]: https://github.com/tokio-rs/tokio/pull/398 1308[#450]: https://github.com/tokio-rs/tokio/pull/450 1309[#477]: https://github.com/tokio-rs/tokio/pull/477 1310[#501]: https://github.com/tokio-rs/tokio/pull/501 1311 1312# 0.1.7 (June 6, 2018) 1313 1314- Add `Runtime::block_on` for concurrent runtime ([#391]). 1315- Provide handle to `current_thread::Runtime` that allows spawning tasks from 1316 other threads ([#340]). 1317- Provide `clock::now()`, a configurable source of time ([#381]). 1318 1319[#340]: https://github.com/tokio-rs/tokio/pull/340 1320[#381]: https://github.com/tokio-rs/tokio/pull/381 1321[#391]: https://github.com/tokio-rs/tokio/pull/391 1322 1323# 0.1.6 (May 2, 2018) 1324 1325- Add asynchronous filesystem APIs ([#323]). 1326- Add "current thread" runtime variant ([#308]). 1327- `CurrentThread`: Expose inner `Park` instance. 1328- Improve fairness of `CurrentThread` executor ([#313]). 1329 1330[#308]: https://github.com/tokio-rs/tokio/pull/308 1331[#313]: https://github.com/tokio-rs/tokio/pull/313 1332[#323]: https://github.com/tokio-rs/tokio/pull/323 1333 1334# 0.1.5 (March 30, 2018) 1335 1336- Provide timer API ([#266]) 1337 1338[#266]: https://github.com/tokio-rs/tokio/pull/266 1339 1340# 0.1.4 (March 22, 2018) 1341 1342- Fix build on FreeBSD ([#218]) 1343- Shutdown the Runtime when the handle is dropped ([#214]) 1344- Set Runtime thread name prefix for worker threads ([#232]) 1345- Add builder for Runtime ([#234]) 1346- Extract TCP and UDP types into separate crates ([#224]) 1347- Optionally support futures 0.2. 1348 1349[#214]: https://github.com/tokio-rs/tokio/pull/214 1350[#218]: https://github.com/tokio-rs/tokio/pull/218 1351[#224]: https://github.com/tokio-rs/tokio/pull/224 1352[#232]: https://github.com/tokio-rs/tokio/pull/232 1353[#234]: https://github.com/tokio-rs/tokio/pull/234 1354 1355# 0.1.3 (March 09, 2018) 1356 1357- Fix `CurrentThread::turn` to block on idle ([#212]). 1358 1359[#212]: https://github.com/tokio-rs/tokio/pull/212 1360 1361# 0.1.2 (March 09, 2018) 1362 1363- Introduce Tokio Runtime ([#141]) 1364- Provide `CurrentThread` for more flexible usage of current thread executor ([#141]). 1365- Add Lio for platforms that support it ([#142]). 1366- I/O resources now lazily bind to the reactor ([#160]). 1367- Extract Reactor to dedicated crate ([#169]) 1368- Add facade to sub crates and add prelude ([#166]). 1369- Switch TCP/UDP fns to poll\_ -> Poll<...> style ([#175]) 1370 1371[#141]: https://github.com/tokio-rs/tokio/pull/141 1372[#142]: https://github.com/tokio-rs/tokio/pull/142 1373[#160]: https://github.com/tokio-rs/tokio/pull/160 1374[#166]: https://github.com/tokio-rs/tokio/pull/166 1375[#169]: https://github.com/tokio-rs/tokio/pull/169 1376[#175]: https://github.com/tokio-rs/tokio/pull/175 1377 1378# 0.1.1 (February 09, 2018) 1379 1380- Doc fixes 1381 1382# 0.1.0 (February 07, 2018) 1383 1384- Initial crate released based on [RFC](https://github.com/tokio-rs/tokio-rfcs/pull/3). 1385