tokio-1.51.3

Ripple-TS/rippletokio-1.51.3May 8, 2026by Darksonn

AI Summary

This patch release addresses critical synchronization issues within Tokio's sync primitives, specifically focusing on MPSC channels and RwLocks to prevent data races and ensure correct behavior when permits are released or channels are closed.

Key Highlights

  • Corrected `mpsc` channel length underflow bug.
  • Fixed notification logic in `OwnedPermit::release()`.
  • Added validation for `RwLock` `max_readers` configuration.
  • Refined error handling for `try_recv()` on closed channels with pending permits.

Full Release Notes

# 1.51.3 (May 8th, 2026)

### Fixed

* sync: fix underflow in mpsc channel `len()` ([#8062])
* sync: notify receivers in mpsc `OwnedPermit::release()` method ([#8075])
* sync: require that an `RwLock` has `max_readers != 0` ([#8076])
* sync: return `Empty` from `try_recv()` when mpsc is closed with outstanding permits ([#8074])

[#8062]: https://github.com/tokio-rs/tokio/pull/8062
[#8074]: https://github.com/tokio-rs/tokio/pull/8074
[#8075]: https://github.com/tokio-rs/tokio/pull/8075
[#8076]: https://github.com/tokio-rs/tokio/pull/8076