tokio-1.26.0

tokio-rs/tokiotokio-1.26.0Mar 1, 2023by carllerche

AI Summary

A minor release fixing critical bugs in macros and synchronization primitives while adding utility functions like `try_exists` and new pipe types.

Key Highlights

  • Fixed empty `join!` and `try_join!`
  • Fixed waker leaks in mutex guards and `Notify`
  • Added `fs::try_exists` and named unix pipe types

New Features

  • Add `fs::try_exists`
  • Add types for named unix pipes
  • Add `MappedOwnedMutexGuard`
  • Fix empty `join!` and `try_join!`
  • Reduce contention in watch channel
  • Improve `Instant::now()` perf
  • Add metric for budget exhaustion yields (Unstable)

Full Release Notes

### Fixed

- macros: fix empty `join!` and `try_join!` ([https://github.com/tokio-rs/tokio/pull/5504])
- sync: don't leak tracing spans in mutex guards ([https://github.com/tokio-rs/tokio/pull/5469])
- sync: drop wakers after unlocking the mutex in Notify ([https://github.com/tokio-rs/tokio/pull/5471])
- sync: drop wakers outside lock in semaphore ([https://github.com/tokio-rs/tokio/pull/5475])

### Added

- fs: add `fs::try_exists` ([https://github.com/tokio-rs/tokio/pull/4299])
- net: add types for named unix pipes ([https://github.com/tokio-rs/tokio/pull/5351])
- sync: add `MappedOwnedMutexGuard` ([https://github.com/tokio-rs/tokio/pull/5474])

### Changed

- chore: update windows-sys to 0.45 ([https://github.com/tokio-rs/tokio/pull/5386])
- net: use Message Read Mode for named pipes ([https://github.com/tokio-rs/tokio/pull/5350])
- sync: mark lock guards with `#[clippy::has_significant_drop]` ([https://github.com/tokio-rs/tokio/pull/5422])
- sync: reduce contention in watch channel ([https://github.com/tokio-rs/tokio/pull/5464])
- time: remove cache padding in timer entries ([https://github.com/tokio-rs/tokio/pull/5468])
- time: Improve `Instant::now()` perf with test-util ([https://github.com/tokio-rs/tokio/pull/5513])

### Internal Changes

- io: use `poll_fn` in `copy_bidirectional` ([https://github.com/tokio-rs/tokio/pull/5486])
- net: refactor named pipe builders to not use bitfields ([https://github.com/tokio-rs/tokio/pull/5477])
- rt: remove Arc from Clock ([https://github.com/tokio-rs/tokio/pull/5434])
- sync: make `notify_waiters` calls atomic ([https://github.com/tokio-rs/tokio/pull/5458])
- time: don't store deadline twice in sleep entries ([https://github.com/tokio-rs/tokio/pull/5410])

### Unstable

- metrics: add a new metric for budget exhaustion yields ([https://github.com/tokio-rs/tokio/pull/5517])

### Documented

- io: improve AsyncFd example ([https://github.com/tokio-rs/tokio/pull/5481])
- runtime: document the nature of the main future ([https://github.com/tokio-rs/tokio/pull/5494])
- runtime: remove extra period in docs ([https://github.com/tokio-rs/tokio/pull/5511])
- signal: updated Documentation for Signals ([https://github.com/tokio-rs/tokio/pull/5459])
- sync: add doc aliases for `blocking_*` methods ([https://github.com/tokio-rs/tokio/pull/5448])
- sync: fix docs for Send/Sync bounds in broadcast ([https://github.com/tokio-rs/tokio/pull/5480])
- sync: document drop behavior for channels ([https://github.com/tokio-rs/tokio/pull/5497])
- task: clarify what happens to spawned work during runtime shutdown ([https://github.com/tokio-rs/tokio/pull/5394])
- task: clarify `process::Command` docs ([https://github.com/tokio-rs/tokio/pull/5413])
- task: fix wording with 'unsend' ([https://github.com/tokio-rs/tokio/pull/5452])
- time: document immediate completion guarantee for timeouts ([https://github.com/tokio-rs/tokio/pull/5509])
- tokio: document supported platforms ([https://github.com/tokio-rs/tokio/pull/5483])

[https://github.com/tokio-rs/tokio/pull/4299]: https://github.com/tokio-rs/tokio/pull/4299
[https://github.com/tokio-rs/tokio/pull/5350]: https://github.com/tokio-rs/tokio/pull/5350
[https://github.com/tokio-rs/tokio/pull/5351]: https://github.com/tokio-rs/tokio/pull/5351
[https://github.com/tokio-rs/tokio/pull/5386]: https://github.com/tokio-rs/tokio/pull/5386
[https://github.com/tokio-rs/tokio/pull/5394]: https://github.com/tokio-rs/tokio/pull/5394
[https://github.com/tokio-rs/tokio/pull/5410]: https://github.com/tokio-rs/tokio/pull/5410
[https://github.com/tokio-rs/tokio/pull/5413]: https://github.com/tokio-rs/tokio/pull/5413
[https://github.com/tokio-rs/tokio/pull/5422]: https://github.com/tokio-rs/tokio/pull/5422
[https://github.com/tokio-rs/tokio/pull/5434]: https://github.com/tokio-rs/tokio/pull/5434
[https://github.com/tokio-rs/tokio/pull/5448]: https://github.com/tokio-rs/tokio/pull/5448
[https://github.com/tokio-rs/tokio/pull/5452]: https://github.com/tokio-rs/tokio/pull/5452
[https://github.com/tokio-rs/tokio/pull/5458]: https://github.com/tokio-rs/tokio/pull/5458
[https://github.com/tokio-rs/tokio/pull/5459]: https://github.com/tokio-rs/tokio/pull/5459
[https://github.com/tokio-rs/tokio/pull/5464]: https://github.com/tokio-rs/tokio/pull/5464
[https://github.com/tokio-rs/tokio/pull/5468]: https://github.com/tokio-rs/tokio/pull/5468
[https://github.com/tokio-rs/tokio/pull/5469]: https://github.com/tokio-rs/tokio/pull/5469
[https://github.com/tokio-rs/tokio/pull/5471]: https://github.com/tokio-rs/tokio/pull/5471
[https://github.com/tokio-rs/tokio/pull/5474]: https://github.com/tokio-rs/tokio/pull/5474
[https://github.com/tokio-rs/tokio/pull/5475]: https://github.com/tokio-rs/tokio/pull/5475
[https://github.com/tokio-rs/tokio/pull/5477]: https://github.com/tokio-rs/tokio/pull/5477
[https://github.com/tokio-rs/tokio/pull/5480]: https://github.com/tokio-rs/tokio/pull/5480
[https://github.com/tokio-rs/tokio/pull/5481]: https://github.com/tokio-rs/tokio/pull/5481
[https://github.com/tokio-rs/tokio/pull/5483]: https://github.com/tokio-rs/tokio/pull/5483
[https://github.com/tokio-rs/tokio/pull/5486]: https://github.com/tokio-rs/tokio/pull/5486
[https://github.com/tokio-rs/tokio/pull/5494]: https://github.com/tokio-rs/tokio/pull/5494
[https://github.com/tokio-rs/tokio/pull/5497]: https://github.com/tokio-rs/tokio/pull/5497
[https://github.com/tokio-rs/tokio/pull/5504]: https://github.com/tokio-rs/tokio/pull/5504
[https://github.com/tokio-rs/tokio/pull/5509]: https://github.com/tokio-rs/tokio/pull/5509
[https://github.com/tokio-rs/tokio/pull/5511]: https://github.com/tokio-rs/tokio/pull/5511
[https://github.com/tokio-rs/tokio/pull/5513]: https://github.com/tokio-rs/tokio/pull/5513
[https://github.com/tokio-rs/tokio/pull/5517]: https://github.com/tokio-rs/tokio/pull/5517