Releases: tokio-rs/tokio
Tokio v0.3.1
This release fixes a use-after-free in the IO driver. Additionally, the read_buf
and write_buf
methods have been added back to the IO traits, as the bytes crate
is now on track to reach version 1.0 together with Tokio.
Fixed
Added
Tokio v0.3.0
This represents a 1.0 beta release. APIs are polished and future-proofed. APIs not included for 1.0 stabilization have been removed.
Biggest changes are:
- I/O driver internal rewrite. The windows implementation includes significant
changes. - Runtime API is polished, especially with how it interacts with feature flag
combinations. - Feature flags are simplified
rt-core
andrt-util
are combined tort
rt-threaded
is renamed tort-multi-thread
to match builder APItcp
,udp
,uds
,dns
are combied tonet
.parking_lot
is included withfull
Changes
- meta: Minimum supported Rust version is now 1.45.
- io:
AsyncRead
trait now takesReadBuf
in order to safely handle reading
into uninitialized memory (#2758). - io: Internal I/O driver storage is now able to compact (#2757).
- rt:
Runtime::block_on
now takes&self
(#2782). - sync:
watch
reworked to decouple receiving a change notification from
receiving the value (#2814, #2806). - sync:
Notify::notify
is renamed tonotify_one
(#2822). - process:
Child::kill
is now anasync fn
that cleans zombies (#2823). - sync: use
const fn
constructors as possible (#2833, #2790) - signal: reduce cross-thread notification (#2835).
- net: tcp,udp,uds types support operations with
&self
(#2828, #2919, #2934). - sync: blocking
mpsc
channel supportssend
with&self
(#2861). - time: rename
delay_for
anddelay_until
tosleep
andsleep_until
(#2826). - io: upgrade to
mio
0.7 (#2893). - io:
AsyncSeek
trait is tweaked (#2885). - fs:
File
operations take&self
(#2930). - rt: runtime API, and
#[tokio::main]
macro polish (#2876) - rt:
Runtime::enter
uses an RAII guard instead of a closure (#2954). - net: the from_std function on all sockets no longer sets socket into non-blocking mode (#2893)
Added
- sync:
map
function to lock guards (#2445). - sync:
blocking_recv
andblocking_send
fns tompsc
for use outside of Tokio (#2685). - rt:
Builder::thread_name_fn
for configuring thread names (#1921). - fs: impl
FromRawFd
andFromRawHandle
forFile
(#2792). - process:
Child::wait
andChild::try_wait
(#2796). - rt: support configuring thread keep-alive duration (#2809).
- rt:
task::JoinHandle::abort
forcibly cancels a spawned task (#2474). - sync:
RwLock
write guard to read guard downgrading (#2733). - net: add
poll_*
functions that take&self
to all net types (#2845) - sync:
get_mut()
forMutex
,RwLock
(#2856). - sync:
mpsc::Sender::closed()
waits forReceiver
half to close (#2840). - sync:
mpsc::Sender::is_closed()
returns true ifReceiver
half is closed (#2726). - stream:
iter
anditer_mut
toStreamMap
(#2890). - net: implement
AsRawSocket
on windows (#2911). - net:
TcpSocket
creates a socket without binding or listening (#2920).
Removed
- io: vectored ops are removed from
AsyncRead
,AsyncWrite
traits (#2882). - io:
mio
is removed from the public API.PollEvented
andRegistration
are
removed (#2893). - io: remove
bytes
from public API.Buf
andBufMut
implementation are
removed (#2908). - time:
DelayQueue
is moved totokio-util
(#2897).
Fixed
- io:
stdout
andstderr
buffering on windows (#2734).
Tokio v0.2.22
This release introduces initial support for tracing
instrumentation within the Tokio
runtime, enabled by the "tracing" feature flag. In addition, it contains a number of bug
fixes and API additions.
Fixes
- docs: misc improvements (#2572, #2658, #2663, #2656, #2647, #2630, #2487, #2621,
#2624, #2600, #2623, #2622, #2577, #2569, #2589, #2575, #2540, #2564, #2567,
#2520, #2521, #2493) - rt: allow calls to
block_on
inside calls toblock_in_place
that are
themselves insideblock_on
(#2645) - net: fix non-portable behavior when dropping
TcpStream
OwnedWriteHalf
(#2597) - io: improve stack usage by allocating large buffers on directly on the heap
(#2634) - io: fix unsound pin projection in
AsyncReadExt::read_buf
and
AsyncWriteExt::write_buf
(#2612) - io: fix unnecessary zeroing for
AsyncRead
implementors (#2525) - io: Fix
BufReader
not correctly forwardingpoll_write_buf
(#2654) - io: fix panic in
AsyncReadExt::read_line
(#2541)
Changes
- coop: returning
Poll::Pending
no longer decrements the task budget (#2549)
Added
- io: little-endian variants of
AsyncReadExt
andAsyncWriteExt
methods
(#1915) - task: add
tracing
instrumentation to spawned tasks (#2655) - sync: allow unsized types in
Mutex
andRwLock
(viadefault
constructors)
(#2615) - net: add
ToSocketAddrs
implementation for&[SocketAddr]
(#2604) - fs: add
OpenOptionsExt
forOpenOptions
(#2515) - fs: add
DirBuilder
(#2524)
Signed-off-by: Eliza Weisman eliza@buoyant.io
Tokio v0.2.21
Bug fixes and API polish.
Fixes
- macros: disambiguate built-in
#[test]
attribute in macro expansion (#2503) - rt:
LocalSet
and task budgeting (#2462). - rt: task budgeting with
block_in_place
(#2502). - sync: release
broadcast
channel memory without sending a value (#2509). - time: notify when resetting a
Delay
to a time in the past (#2290).
Added
Tokio v0.2.20
Tokio v0.2.19
Fixes
- docs: misc improvements (#2400, #2405, #2414, #2420, #2423, #2426, #2427, #2434, #2436, #2440).
- rt: support
block_in_place
in more contexts (#2409, #2410). - stream: no panic in
merge()
andchain()
when usingsize_hint()
(#2430). - task: include visibility modifier when defining a task-local (#2416).
Added
Tokio v0.2.18
Fixes a regression with LocalSet
that allowed !Send
futures to cross threads.
This change makes LocalSet
!Send
. The Send
implementation was accidentally added in v0.2.14. Removing the Send
implementation is not considered a breaking change as it fixes a soundness bug and the implementation was accidental.
Fixes
Tokio 0.2.17
This release fixes a bug in the threaded scheduler that could result in panics under load (see #2382). Additionally, the default number of worker threads now uses the logical CPU count, so it will now respect scheduler affinity and cgroups
CPU quotas.
Fixes
- rt: bug in work-stealing queue (#2387)
Changes
- rt: threadpool uses logical CPU count instead of physical by default (#2391)