Skip to content

2.4.0

Latest

Choose a tag to compare

@kotauskas kotauskas released this 22 Feb 23:04
2.4.0
41facdd

General

  • Concurrency prevention for local sockets has been removed. It is now possible to perform I/O on the same local socket stream from multiple threads at once without encountering any panics.
  • split on local socket streams has been soft-deprecated due to being identical in functionality and performance characteristics to putting the local socket stream into an Rc or Arc. Deprecation warnings will not be emitted for programs that use split, but replacing it with Rc or Arc is preferred.
  • peer_pid is back in style: local socket streams now have a peer_creds method that returns the credentials of the other side of the connection. Those include the process ID, effective user and group ID, and list of supplementary groups.

Windows

  • Fixed an embarrassing memory leak in the linger pool. Versions 2.3.0 and 2.3.1 would leak a small amount of memory for every Tokio-based stream lingered.
  • Fixed a benign use-after-free bug in MaybeArc::try_make_owned (called in reunite) that was introduced in version 2.0.0. To my knowledge, it is not possible to trigger undefined behavior from safe code using this bug.
  • Synchronous named pipes now use overlapped I/O, just like Tokio-based ones. This allows for concurrent I/O operations on the same stream as described in General. Thanks to Sebastian Schöner for his blog post that prompted me to carefully reread Microsoft documentation and guided me toward the solution!
  • All owned handles now provide one sentinel value for niche optimization (via NonZeroIsize, since 0 is not a valid handle value).