108 KiB
1.29.1 (June 29, 2023)
Fixed
- rt: fix nesting two
block_in_placewith ablock_onbetween (#5837)
1.29.0 (June 27, 2023)
Technically a breaking change, the Send implementation is removed from
runtime::EnterGuard. This change fixes a bug and should not impact most users.
Breaking
- rt:
EnterGuardshould not beSend(#5766)
Fixed
- fs: reduce blocking ops in
fs::read_dir(#5653) - rt: fix possible starvation (#5686, #5712)
- rt: fix stacked borrows issue in
JoinSet(#5693) - rt: panic if
EnterGuarddropped incorrect order (#5772) - time: do not overflow to signal value (#5710)
- fs: wait for in-flight ops before cloning
File(#5803)
Changed
Added
- net: add uds doc alias for unix sockets (#5659)
- rt: add metric for number of tasks (#5628)
- sync: implement more traits for channel errors (#5666)
- net: add nodelay methods on TcpSocket (#5672)
- sync: add
broadcast::Receiver::blocking_recv(#5690) - process: add
raw_argmethod toCommand(#5704) - io: support PRIORITY epoll events (#5566)
- task: add
JoinSet::poll_join_next(#5721) - net: add support for Redox OS (#5790)
Unstable
- rt: add the ability to dump task backtraces (#5608, #5676, #5708, #5717)
- rt: instrument task poll times with a histogram (#5685)
1.28.2 (May 28, 2023)
Forward ports 1.18.6 changes.
Fixed
- deps: disable default features for mio (#5728)
1.28.1 (May 10th, 2023)
This release fixes a mistake in the build script that makes AsFd
implementations unavailable on Rust 1.63. (#5677)
1.28.0 (April 25th, 2023)
Added
- io: add
AsyncFd::async_io(#5542) - io: impl BufMut for ReadBuf (#5590)
- net: add
recv_bufforUdpSocketandUnixDatagram(#5583) - sync: add
OwnedSemaphorePermit::semaphore(#5618) - sync: add
same_channelto broadcast channel (#5607) - sync: add
watch::Receiver::wait_for(#5611) - task: add
JoinSet::spawn_blockingandJoinSet::spawn_blocking_on(#5612)
Changed
- deps: update windows-sys to 0.48 (#5591)
- io: make
read_to_endnot grow unnecessarily (#5610) - macros: make entrypoints more efficient (#5621)
- sync: improve Debug impl for
RwLock(#5647) - sync: reduce contention in
Notify(#5503)
Fixed
- net: support
get_peer_credon AIX (#5065) - sync: avoid deadlocks in
broadcastwith custom wakers (#5578)
Documented
- sync: fix typo in
Semaphore::MAX_PERMITS(#5645) - sync: fix typo in
tokio::sync::watch::Senderdocs (#5587)
1.27.0 (March 27th, 2023)
This release bumps the MSRV of Tokio to 1.56. (#5559)
Added
- io: add
async_iohelper method to sockets (#5512) - io: add implementations of
AsFd/AsHandle/AsSocket(#5514, #5540) - net: add
UdpSocket::peek_sender()(#5520) - sync: add
RwLockWriteGuard::{downgrade_map, try_downgrade_map}(#5527) - task: add
JoinHandle::abort_handle(#5543)
Changed
- io: use
memchrfromlibc(#5558) - macros: accept path as crate rename in
#[tokio::main](#5557) - macros: update to syn 2.0.0 (#5572)
- time: don't register for a wakeup when
IntervalreturnsReady(#5553)
Fixed
- fs: fuse std iterator in
ReadDir(#5555) - tracing: fix
spawn_blockinglocation fields (#5573) - time: clean up redundant check in
Wheel::poll()(#5574)
Documented
- macros: define cancellation safety (#5525)
- io: add details to docs of
tokio::io::copy[_buf](#5575) - io: refer to
ReaderStreamandStreamReaderin module docs (#5576)
1.26.0 (March 1st, 2023)
Fixed
- macros: fix empty
join!andtry_join!(#5504) - sync: don't leak tracing spans in mutex guards (#5469)
- sync: drop wakers after unlocking the mutex in Notify (#5471)
- sync: drop wakers outside lock in semaphore (#5475)
Added
- fs: add
fs::try_exists(#4299) - net: add types for named unix pipes (#5351)
- sync: add
MappedOwnedMutexGuard(#5474)
Changed
- chore: update windows-sys to 0.45 (#5386)
- net: use Message Read Mode for named pipes (#5350)
- sync: mark lock guards with
#[clippy::has_significant_drop](#5422) - sync: reduce contention in watch channel (#5464)
- time: remove cache padding in timer entries (#5468)
- time: Improve
Instant::now()perf with test-util (#5513)
Internal Changes
- io: use
poll_fnincopy_bidirectional(#5486) - net: refactor named pipe builders to not use bitfields (#5477)
- rt: remove Arc from Clock (#5434)
- sync: make
notify_waiterscalls atomic (#5458) - time: don't store deadline twice in sleep entries (#5410)
Unstable
- metrics: add a new metric for budget exhaustion yields (#5517)
Documented
- io: improve AsyncFd example (#5481)
- runtime: document the nature of the main future (#5494)
- runtime: remove extra period in docs (#5511)
- signal: updated Documentation for Signals (#5459)
- sync: add doc aliases for
blocking_*methods (#5448) - sync: fix docs for Send/Sync bounds in broadcast (#5480)
- sync: document drop behavior for channels (#5497)
- task: clarify what happens to spawned work during runtime shutdown (#5394)
- task: clarify
process::Commanddocs (#5413) - task: fix wording with 'unsend' (#5452)
- time: document immediate completion guarantee for timeouts (#5509)
- tokio: document supported platforms (#5483)
1.25.1 (May 28, 2023)
Forward ports 1.18.6 changes.
Fixed
- deps: disable default features for mio (#5728)
1.25.0 (January 28, 2023)
Fixed
- rt: fix runtime metrics reporting (#5330)
Added
- sync: add
broadcast::Sender::len(#5343)
Changed
- fs: increase maximum read buffer size to 2MiB (#5397)
1.24.2 (January 17, 2023)
Forward ports 1.18.5 changes.
Fixed
- io: fix unsoundness in
ReadHalf::unsplit(#5375)
1.24.1 (January 6, 2022)
This release fixes a compilation failure on targets without AtomicU64 when using rustc older than 1.63. (#5356)
1.24.0 (January 5, 2022)
Fixed
- rt: improve native
AtomicU64support detection (#5284)
Added
- rt: add configuration option for max number of I/O events polled from the OS per tick (#5186)
- rt: add an environment variable for configuring the default number of worker threads per runtime instance (#4250)
Changed
- sync: reduce MPSC channel stack usage (#5294)
- io: reduce lock contention in I/O operations (#5300)
- fs: speed up
read_dir()by chunking operations (#5309) - rt: use internal
ThreadIdimplementation (#5329) - test: don't auto-advance time when a
spawn_blockingtask is running (#5115)
1.23.1 (January 4, 2022)
This release forward ports changes from 1.18.4.
Fixed
- net: fix Windows named pipe server builder to maintain option when toggling pipe mode (#5336).
1.23.0 (December 5, 2022)
Fixed
- net: fix Windows named pipe connect (#5208)
- io: support vectored writes for
ChildStdin(#5216) - io: fix
async fn ready()false positive for OS-specific events (#5231)
Changed
- runtime:
yield_nowdefers task until after driver poll (#5223) - runtime: reduce amount of codegen needed per spawned task (#5213)
- windows: replace
winapidependency withwindows-sys(#5204)
1.22.0 (November 17, 2022)
Added
- runtime: add
Handle::runtime_flavor(#5138) - sync: add
Mutex::blocking_lock_owned(#5130) - sync: add
Semaphore::MAX_PERMITS(#5144) - sync: add
merge()to semaphore permits (#4948) - sync: add
mpsc::WeakUnboundedSender(#5189)
Added (unstable)
- process: add
Command::process_group(#5114) - runtime: export metrics about the blocking thread pool (#5161)
- task: add
task::id()andtask::try_id()(#5171)
Fixed
- macros: don't take ownership of futures in macros (#5087)
- runtime: fix Stacked Borrows violation in
LocalOwnedTasks(#5099) - runtime: mitigate ABA with 32-bit queue indices when possible (#5042)
- task: wake local tasks to the local queue when woken by the same thread (#5095)
- time: panic in release mode when
mark_pendingcalled illegally (#5093) - runtime: fix typo in expect message (#5169)
- runtime: fix
unsync_loadon atomic types (#5175) - task: elaborate safety comments in task deallocation (#5172)
- runtime: fix
LocalSetdrop in thread local (#5179) - net: remove libc type leakage in a public API (#5191)
- runtime: update the alignment of
CachePadded(#5106)
Changed
- io: make
tokio::io::copycontinue filling the buffer when writer stalls (#5066) - runtime: remove
coop::budgetfromLocalSet::run_until(#5155) - sync: make
Notifypanic safe (#5154)
Documented
- io: fix doc for
write_i8to use signed integers (#5040) - net: fix doc typos for TCP and UDP
set_tosmethods (#5073) - net: fix function name in
UdpSocket::recvdocumentation (#5150) - sync: typo in
TryLockErrorforRwLock::try_write(#5160) - task: document that spawned tasks execute immediately (#5117)
- time: document return type of
timeout(#5118) - time: document that
timeoutchecks only before poll (#5126) - sync: specify return type of
oneshot::Receiverin docs (#5198)
Internal changes
- runtime: use const
Mutex::newfor globals (#5061) - runtime: remove
Optionaroundmio::Eventsin io driver (#5078) - runtime: remove a conditional compilation clause (#5104)
- runtime: remove a reference to internal time handle (#5107)
- runtime: misc time driver cleanup (#5120)
- runtime: move signal driver to runtime module (#5121)
- runtime: signal driver now uses I/O driver directly (#5125)
- runtime: start decoupling I/O driver and I/O handle (#5127)
- runtime: switch
io::handlerefs with scheduler:Handle (#5128) - runtime: remove Arc from I/O driver (#5134)
- runtime: use signal driver handle via
scheduler::Handle(#5135) - runtime: move internal clock fns out of context (#5139)
- runtime: remove
runtime::contextmodule (#5140) - runtime: keep driver cfgs in
driver.rs(#5141) - runtime: add
runtime::contextto unify thread-locals (#5143) - runtime: rename some confusing internal variables/fns (#5151)
- runtime: move
coopmod intoruntime(#5152) - runtime: move budget state to context thread-local (#5157)
- runtime: move park logic into runtime module (#5158)
- runtime: move
Runtimeinto its own file (#5159) - runtime: unify entering a runtime with
Handle::enter(#5163) - runtime: remove handle reference from each scheduler (#5166)
- runtime: move
enterintocontext(#5167) - runtime: combine context and entered thread-locals (#5168)
- runtime: fix accidental unsetting of current handle (#5178)
- runtime: move
CoreStagemethods toCore(#5182) - sync: name mpsc semaphore types (#5146)
1.21.2 (September 27, 2022)
This release removes the dependency on the once_cell crate to restore the MSRV
of 1.21.x, which is the latest minor version at the time of release. (#5048)
1.21.1 (September 13, 2022)
Fixed
- net: fix dependency resolution for socket2 (#5000)
- task: ignore failure to set TLS in
LocalSetDrop (#4976)
1.21.0 (September 2, 2022)
This release is the first release of Tokio to intentionally support WASM. The
sync,macros,io-util,rt,time features are stabilized on WASM. Additionally the
wasm32-wasi target is given unstable support for the net feature.
Added
- net: add
deviceandbind_devicemethods to TCP/UDP sockets (#4882) - net: add
tosandset_tosmethods to TCP and UDP sockets (#4877) - net: add security flags to named pipe
ServerOptions(#4845) - signal: add more windows signal handlers (#4924)
- sync: add
mpsc::Sender::max_capacitymethod (#4904) - sync: implement Weak version of
mpsc::Sender(#4595) - task: add
LocalSet::enter(#4765) - task: stabilize
JoinSetandAbortHandle(#4920) - tokio: add
track_callerto public APIs (#4805, #4848, #4852) - wasm: initial support for
wasm32-wasitarget (#4716)
Fixed
- miri: improve miri compatibility by avoiding temporary references in
linked_list::Linkimpls (#4841) - signal: don't register write interest on signal pipe (#4898)
- sync: add
#[must_use]to lock guards (#4886) - sync: fix hang when calling
recvon closed and reopened broadcast channel (#4867) - task: propagate attributes on task-locals (#4837)
Changed
- fs: change panic to error in
File::start_seek(#4897) - io: reduce syscalls in
poll_read(#4840) - process: use blocking threadpool for child stdio I/O (#4824)
- signal: make
SignalKindmethods const (#4956)
Internal changes
- rt: extract
basic_scheduler::Config(#4935) - rt: move I/O driver into
runtimemodule (#4942) - rt: rename internal scheduler types (#4945)
Documented
- chore: fix typos and grammar (#4858, #4894, #4928)
- io: fix typo in
AsyncSeekExt::rewinddocs (#4893) - net: add documentation to
try_read()for zero-length buffers (#4937) - runtime: remove incorrect panic section for
Builder::worker_threads(#4849) - sync: doc of
watch::Sender::sendimproved (#4959) - task: add cancel safety docs to
JoinHandle(#4901) - task: expand on cancellation of
spawn_blocking(#4811) - time: clarify that the first tick of
Interval::tickhappens immediately (#4951)
Unstable
- rt: add unstable option to disable the LIFO slot (#4936)
- task: fix incorrect signature in
Builder::spawn_on(#4953) - task: make
task::Builder::spawn*methods fallible (#4823)
1.20.5 (May 28, 2023)
Forward ports 1.18.6 changes.
Fixed
- deps: disable default features for mio (#5728)
1.20.4 (January 17, 2023)
Forward ports 1.18.5 changes.
Fixed
- io: fix unsoundness in
ReadHalf::unsplit(#5375)
1.20.3 (January 3, 2022)
This release forward ports changes from 1.18.4.
Fixed
- net: fix Windows named pipe server builder to maintain option when toggling pipe mode (#5336).
1.20.2 (September 27, 2022)
This release removes the dependency on the once_cell crate to restore the MSRV
of the 1.20.x LTS release. (#5048)
1.20.1 (July 25, 2022)
Fixed
- chore: fix version detection in build script (#4860)
1.20.0 (July 12, 2022)
Added
- tokio: add
track_callerto public APIs (#4772, #4791, #4793, #4806, #4808) - sync: Add
has_changedmethod towatch::Ref(#4758)
Changed
- time: remove
src/time/driver/wheel/stack.rs(#4766) - rt: clean up arguments passed to basic scheduler (#4767)
- net: be more specific about winapi features (#4764)
- tokio: use const initialized thread locals where possible (#4677)
- task: various small improvements to LocalKey (#4795)
Documented
- fs: warn about performance pitfall (#4762)
- chore: fix spelling (#4769)
- sync: document spurious failures in oneshot (#4777)
- sync: add warning for watch in non-Send futures (#4741)
- chore: fix typo (#4798)
Unstable
- joinset: rename
join_onetojoin_next(#4755) - rt: unhandled panic config for current thread rt (#4770)
1.19.2 (June 6, 2022)
This release fixes another bug in Notified::enable. (#4751)
1.19.1 (June 5, 2022)
This release fixes a bug in Notified::enable. (#4747)
1.19.0 (June 3, 2022)
Added
- runtime: add
is_finishedmethod forJoinHandleandAbortHandle(#4709) - runtime: make global queue and event polling intervals configurable (#4671)
- sync: add
Notified::enable(#4705) - sync: add
watch::Sender::send_if_modified(#4591) - sync: add resubscribe method to broadcast::Receiver (#4607)
- net: add
take_errortoTcpSocketandTcpStream(#4739)
Changed
- io: refactor out usage of Weak in the io handle (#4656)
Fixed
- macros: avoid starvation in
join!andtry_join!(#4624)
Documented
- runtime: clarify semantics of tasks outliving
block_on(#4729) - time: fix example for
MissedTickBehavior::Burst(#4713)
Unstable
- metrics: correctly update atomics in
IoDriverMetrics(#4725) - metrics: fix compilation with unstable, process, and rt, but without net (#4682)
- task: add
#[track_caller]toJoinSet/JoinMap(#4697) - task: add
Builder::{spawn_on, spawn_local_on, spawn_blocking_on}(#4683) - task: add
consume_budgetfor cooperative scheduling (#4498) - task: add
join_set::Builderfor configuringJoinSettasks (#4687) - task: update return value of
JoinSet::join_one(#4726)
1.18.6 (May 28, 2023)
Fixed
- deps: disable default features for mio (#5728)
1.18.5 (January 17, 2023)
Fixed
- io: fix unsoundness in
ReadHalf::unsplit(#5375)
1.18.4 (January 3, 2022)
Fixed
- net: fix Windows named pipe server builder to maintain option when toggling pipe mode (#5336).
1.18.3 (September 27, 2022)
This release removes the dependency on the once_cell crate to restore the MSRV
of the 1.18.x LTS release. (#5048)
1.18.2 (May 5, 2022)
Add missing features for the winapi dependency. (#4663)
1.18.1 (May 2, 2022)
The 1.18.0 release broke the build for targets without 64-bit atomics when
building with tokio_unstable. This release fixes that. (#4649)
1.18.0 (April 27, 2022)
This release adds a number of new APIs in tokio::net, tokio::signal, and
tokio::sync. In addition, it adds new unstable APIs to tokio::task (Ids
for uniquely identifying a task, and AbortHandle for remotely cancelling a
task), as well as a number of bugfixes.
Fixed
- blocking: add missing
#[track_caller]forspawn_blocking(#4616) - macros: fix
selectmacro to process 64 branches (#4519) - net: fix
try_iomethods not calling Mio'stry_iointernally (#4582) - runtime: recover when OS fails to spawn a new thread (#4485)
Added
- net: add
UdpSocket::peer_addr(#4611) - net: add
try_read_bufmethod for named pipes (#4626) - signal: add
SignalKindHash/Eqimpls andc_intconversion (#4540) - signal: add support for signals up to
SIGRTMAX(#4555) - sync: add
watch::Sender::send_modifymethod (#4310) - sync: add
broadcast::Receiver::lenmethod (#4542) - sync: add
watch::Receiver::same_channelmethod (#4581) - sync: implement
CloneforRecvErrortypes (#4560)
Changed
- update
mioto 0.8.1 (#4582) - macros: rename
tokio::select!'s internalutilmodule (#4543) - runtime: use
Vec::with_capacitywhen building runtime (#4553)
Documented
- improve docs for
tokio_unstable(#4524) - runtime: include more documentation for thread_pool/worker (#4511)
- runtime: update
Handle::current's docs to mentionEnterGuard(#4567) - time: clarify platform specific timer resolution (#4474)
- signal: document that
Signal::recvis cancel-safe (#4634) - sync:
UnboundedReceiverclose docs (#4548)
Unstable
The following changes only apply when building with --cfg tokio_unstable:
- task: add
task::Idtype (#4630) - task: add
AbortHandletype for cancelling tasks in aJoinSet(#4530, #4640) - task: fix missing
doc(cfg(...))attributes forJoinSet(#4531) - task: fix broken link in
AbortHandleRustDoc (#4545) - metrics: add initial IO driver metrics (#4507)
1.17.0 (February 16, 2022)
This release updates the minimum supported Rust version (MSRV) to 1.49, the
mio dependency to v0.8, and the (optional) parking_lot dependency to v0.12.
Additionally, it contains several bug fixes, as well as internal refactoring and
performance improvements.
Fixed
- time: prevent panicking in
sleepwith large durations (#4495) - time: eliminate potential panics in
Instantarithmetic on platforms whereInstant::nowis not monotonic (#4461) - io: fix
DuplexStreamnot participating in cooperative yielding (#4478) - rt: fix potential double panic when dropping a
JoinHandle(#4430)
Changed
- update minimum supported Rust version to 1.49 (#4457)
- update
parking_lotdependency to v0.12.0 (#4459) - update
miodependency to v0.8 (#4449) - rt: remove an unnecessary lock in the blocking pool (#4436)
- rt: remove an unnecessary enum in the basic scheduler (#4462)
- time: use bit manipulation instead of modulo to improve performance (#4480)
- net: use
std::future::Readyinstead of our ownReadyfuture (#4271) - replace deprecated
atomic::spin_loop_hintwithhint::spin_loop(#4491) - fix miri failures in intrusive linked lists (#4397)
Documented
- io: add an example for
tokio::process::ChildStdin(#4479)
Unstable
The following changes only apply when building with --cfg tokio_unstable:
- task: fix missing location information in
tracingspans generated byspawn_local(#4483) - task: add
JoinSetfor managing sets of tasks (#4335) - metrics: fix compilation error on MIPS (#4475)
- metrics: fix compilation error on arm32v7 (#4453)
1.16.1 (January 28, 2022)
This release fixes a bug in #4428 with the change #4437.
1.16.0 (January 27, 2022)
Fixes a soundness bug in io::Take (#4428). The unsoundness is exposed when
leaking memory in the given AsyncRead implementation and then overwriting the
supplied buffer:
impl AsyncRead for Buggy {
fn poll_read(
self: Pin<&mut Self>,
cx: &mut Context<'_>,
buf: &mut ReadBuf<'_>
) -> Poll<Result<()>> {
let new_buf = vec![0; 5].leak();
*buf = ReadBuf::new(new_buf);
buf.put_slice(b"hello");
Poll::Ready(Ok(()))
}
}
Also, this release includes improvements to the multi-threaded scheduler that can increase throughput by up to 20% in some cases (#4383).
Fixed
- io: soundness don't expose uninitialized memory when using
io::Takein edge case (#4428) - fs: ensure
File::writeresults in awritesyscall when the runtime shuts down (#4316) - process: drop pipe after child exits in
wait_with_output(#4315) - rt: improve error message when spawning a thread fails (#4398)
- rt: reduce false-positive thread wakups in the multi-threaded scheduler (#4383)
- sync: don't inherit
Sendfromparking_lot::*Guard(#4359)
Added
- net:
TcpSocket::linger()andset_linger()(#4324) - net: impl
UnwindSafefor socket types (#4384) - rt: impl
UnwindSafeforJoinHandle(#4418) - sync:
watch::Receiver::has_changed()(#4342) - sync:
oneshot::Receiver::blocking_recv()(#4334) - sync:
RwLockblocking operations (#4425)
Unstable
The following changes only apply when building with --cfg tokio_unstable
- rt: breaking change overhaul runtime metrics API (#4373)
1.15.0 (December 15, 2021)
Fixed
- io: add cooperative yielding support to
io::empty()(#4300) - time: make timeout robust against budget-depleting tasks (#4314)
Changed
- update minimum supported Rust version to 1.46.
Added
- time: add
Interval::reset()(#4248) - io: add explicit lifetimes to
AsyncFdReadyGuard(#4267) - process: add
Command::as_std()(#4295)
Added (unstable)
- tracing: instrument
tokio::synctypes (#4302)
1.14.0 (November 15, 2021)
Fixed
- macros: fix compiler errors when using
mutpatterns inselect!(#4211) - sync: fix a data race between
oneshot::Sender::sendand awaiting aoneshot::Receiverwhen the oneshot has been closed (#4226) - sync: make
AtomicWakerpanic safe (#3689) - runtime: fix basic scheduler dropping tasks outside a runtime context (#4213)
Added
Changed
- io: updated
copybuffer size to matchstd::io::copy(#4209)
Documented
1.13.1 (November 15, 2021)
Fixed
- sync: fix a data race between
oneshot::Sender::sendand awaiting aoneshot::Receiverwhen the oneshot has been closed (#4226)
1.13.0 (October 29, 2021)
Fixed
- sync: fix
Notifyto clone the waker before locking its waiter list (#4129) - tokio: add riscv32 to non atomic64 architectures (#4185)
Added
- net: add
poll_{recv,send}_readymethods toudpanduds_datagram(#4131) - net: add
try_*,readable,writable,ready, andpeer_addrmethods to split halves (#4120) - sync: add
blocking_locktoMutex(#4130) - sync: add
watch::Sender::send_replace(#3962, #4195) - sync: expand
DebugforMutex<T>impl to unsizedT(#4134) - tracing: instrument time::Sleep (#4072)
- tracing: use structured location fields for spawned tasks (#4128)
Changed
- io: add assert in
copy_bidirectionalthatpoll_writeis sensible (#4125) - macros: use qualified syntax when polling in
select!(#4192) - runtime: handle
block_onwakeups better (#4157) - task: allocate callback on heap immediately in debug mode (#4203)
- tokio: assert platform-minimum requirements at build time (#3797)
Documented
- docs: conversion of doc comments to indicative mood (#4174)
- docs: add returning on the first error example for
try_join!(#4133) - docs: fixing broken links in
tokio/src/lib.rs(#4132) - signal: add example with background listener (#4171)
- sync: add more oneshot examples (#4153)
- time: document
Interval::tickcancel safety (#4152)
1.12.0 (September 21, 2021)
Fixed
- mpsc: ensure
try_reserveerror is consistent withtry_send(#4119) - mpsc: use
spin_loop_hintinstead ofyield_now(#4115) - sync: make
SendErrorfield public (#4097)
Added
- io: add POSIX AIO on FreeBSD (#4054)
- io: add convenience method
AsyncSeekExt::rewind(#4107) - runtime: add tracing span for
block_onfutures (#4094) - runtime: callback when a worker parks and unparks (#4070)
- sync: implement
try_recvfor mpsc channels (#4113)
Documented
- docs: clarify CPU-bound tasks on Tokio (#4105)
- mpsc: document spurious failures on
poll_recv(#4117) - mpsc: document that
PollSenderimplsSink(#4110) - task: document non-guarantees of
yield_now(#4091) - time: document paused time details better (#4061, #4103)
1.11.0 (August 31, 2021)
Fixed
- time: don't panic when Instant is not monotonic (#4044)
- io: fix panic in
fill_bufby not callingpoll_fill_buftwice (#4084)
Added
- watch: add
watch::Sender::subscribe(#3800) - process: add
from_stdtoChildStd*(#4045) - stats: initial work on runtime stats (#4043)
Changed
- tracing: change span naming to new console convention (#4042)
- io: speed-up waking by using uninitialized array (#4055, #4071, #4075)
Documented
- time: make Sleep examples easier to find (#4040)
1.10.1 (August 24, 2021)
Fixed
- runtime: fix leak in UnownedTask (#4063)
1.10.0 (August 12, 2021)
Added
- io: add
(read|write)_f(32|64)[_le]methods (#4022) - io: add
fill_bufandconsumetoAsyncBufReadExt(#3991) - process: add
Child::raw_handle()on windows (#3998)
Fixed
- doc: fix non-doc builds with
--cfg docsrs(#4020) - io: flush eagerly in
io::copy(#4001) - runtime: a debug assert was sometimes triggered during shutdown (#4005)
- sync: use
spin_loop_hintinstead ofyield_nowin mpsc (#4037) - tokio: the test-util feature depends on rt, sync, and time (#4036)
Changes
- runtime: reorganize parts of the runtime (#3979, #4005)
- signal: make windows docs for signal module show up on unix builds (#3770)
- task: quickly send task to heap on debug mode (#4009)
Documented
- io: document cancellation safety of
AsyncBufReadExt(#3997) - sync: document when
watch::sendfails (#4021)
1.9.0 (July 22, 2021)
Added
- net: allow customized I/O operations for
TcpStream(#3888) - sync: add getter for the mutex from a guard (#3928)
- task: expose nameable future for
TaskLocal::scope(#3273)
Fixed
Changes
- runtime: reorganize parts of the runtime (#3909, #3939, #3950, #3955, #3980)
- sync: clean up
OnceCell(#3945) - task: remove mutex in
JoinError(#3959)
1.8.3 (July 26, 2021)
This release backports two fixes from 1.9.0
Fixed
1.8.2 (July 19, 2021)
Fixes a missed edge case from 1.8.1.
Fixed
- runtime: drop canceled future on next poll (#3965)
1.8.1 (July 6, 2021)
Forward ports 1.5.1 fixes.
Fixed
- runtime: remotely abort tasks on
JoinHandle::abort(#3934)
1.8.0 (July 2, 2021)
Added
- io: add
get_{ref,mut}methods toAsyncFdReadyGuardandAsyncFdReadyMutGuard(#3807) - io: efficient implementation of vectored writes for
BufWriter(#3163) - net: add ready/try methods to
NamedPipe{Client,Server}(#3866, #3899) - sync: add
watch::Receiver::borrow_and_update(#3813) - sync: implement
From<T>forOnceCell<T>(#3877) - time: allow users to specify Interval behaviour when delayed (#3721)
Added (unstable)
- rt: add
tokio::task::Builder(#3881)
Fixed
- net: handle HUP event with
UnixStream(#3898)
Documented
- doc: document cancellation safety (#3900)
- time: add wait alias to sleep (#3897)
- time: document auto-advancing behaviour of runtime (#3763)
1.7.2 (July 6, 2021)
Forward ports 1.5.1 fixes.
Fixed
- runtime: remotely abort tasks on
JoinHandle::abort(#3934)
1.7.1 (June 18, 2021)
Fixed
- runtime: fix early task shutdown during runtime shutdown (#3870)
1.7.0 (June 15, 2021)
Added
- net: add named pipes on windows (#3760)
- net: add
TcpSocketfromstd::net::TcpStreamconversion (#3838) - sync: add
receiver_counttowatch::Sender(#3729) - sync: export
sync::notify::Notifiedfuture publicly (#3840) - tracing: instrument task wakers (#3836)
Fixed
- macros: suppress
clippy::default_numeric_fallbacklint in generated code (#3831) - runtime: immediately drop new tasks when runtime is shut down (#3752)
- sync: deprecate unused
mpsc::RecvErrortype (#3833)
Documented
- io: clarify EOF condition for
AsyncReadExt::read_buf(#3850) - io: clarify limits on return values of
AsyncWrite::poll_write(#3820) - sync: add examples to Semaphore (#3808)
1.6.3 (July 6, 2021)
Forward ports 1.5.1 fixes.
Fixed
- runtime: remotely abort tasks on
JoinHandle::abort(#3934)
1.6.2 (June 14, 2021)
Fixes
- test: sub-ms
time:advanceregression introduced in 1.6 (#3852)
1.6.1 (May 28, 2021)
This release reverts #3518 because it doesn't work on some kernels due to a kernel bug. (#3803)
1.6.0 (May 14, 2021)
Added
- fs: try doing a non-blocking read before punting to the threadpool (#3518)
- io: add
write_all_buftoAsyncWriteExt(#3737) - io: implement
AsyncSeekforBufReader,BufWriter, andBufStream(#3491) - net: support non-blocking vectored I/O (#3761)
- sync: add
mpsc::Sender::{reserve_owned, try_reserve_owned}(#3704) - sync: add a
MutexGuard::mapmethod that returns aMappedMutexGuard(#2472) - time: add getter for Interval's period (#3705)
Fixed
- io: wake pending writers on
DuplexStreamclose (#3756) - process: avoid redundant effort to reap orphan processes (#3743)
- signal: use
std::os::raw::c_intinstead oflibc::c_inton public API (#3774) - sync: preserve permit state in
notify_waiters(#3660) - task: update
JoinHandlepanic message (#3727) - time: prevent
time::advancefrom going too far (#3712)
Documented
- net: hide
net::unix::datagrammodule from docs (#3775) - process: updated example (#3748)
- sync:
Barrierdoc should use task, not thread (#3780) - task: update documentation on
block_in_place(#3753)
1.5.1 (July 6, 2021)
Fixed
- runtime: remotely abort tasks on
JoinHandle::abort(#3934)
1.5.0 (April 12, 2021)
Added
- io: add
AsyncSeekExt::stream_position(#3650) - io: add
AsyncWriteExt::write_vectored(#3678) - io: add a
copy_bidirectionalutility (#3572) - net: implement
IntoRawFdforTcpSocket(#3684) - sync: add
OnceCell(#3591) - sync: add
OwnedRwLockReadGuardandOwnedRwLockWriteGuard(#3340) - sync: add
Semaphore::is_closed(#3673) - sync: add
mpsc::Sender::capacity(#3690) - sync: allow configuring
RwLockmax reads (#3644) - task: add
sync_scopeforLocalKey(#3612)
Fixed
- chore: try to avoid
noaliasattributes on intrusive linked list (#3654) - rt: fix panic in
JoinHandle::abort()when called from other threads (#3672) - sync: don't panic in
oneshot::try_recv(#3674) - sync: fix notifications getting dropped on receiver drop (#3652)
- sync: fix
Semaphorepermit overflow calculation (#3644)
Documented
- io: clarify requirements of
AsyncFd(#3635) - runtime: fix unclear docs for
{Handle,Runtime}::block_on(#3628) - sync: document that
Semaphoreis fair (#3693) - sync: improve doc on blocking mutex (#3645)
1.4.0 (March 20, 2021)
Added
Fixed
- runtime: avoid unnecessary polling of
block_onfuture (#3582) - runtime: fix memory leak/growth when creating many runtimes (#3564)
- runtime: mark
EnterGuardwithmust_use(#3609)
Documented
- chore: mention fix for building docs in contributing guide (#3618)
- doc: add link to
PollSender(#3613) - doc: alias sleep to delay (#3604)
- sync: improve
MutexFIFO explanation (#3615) - timer: fix double newline in module docs (#3617)
1.3.0 (March 9, 2021)
Added
- coop: expose an
unconstrained()opt-out (#3547) - net: add
into_stdfor net types without it (#3509) - sync: add
same_channelmethod tompsc::Sender(#3532) - sync: add
{try_,}acquire_many_ownedtoSemaphore(#3535) - sync: add back
RwLockWriteGuard::mapandRwLockWriteGuard::try_map(#3348)
Fixed
- sync: allow
oneshot::Receiver::closeafter successfultry_recv(#3552) - time: do not panic on
timeout(Duration::MAX)(#3551)
Documented
- doc: doc aliases for pre-1.0 function names (#3523)
- io: fix typos (#3541)
- io: note the EOF behaviour of
read_until(#3536) - io: update
AsyncRead::poll_readdoc (#3557) - net: update
UdpSocketsplitting doc (#3517) - runtime: add link to
LocalSetonnew_current_thread(#3508) - runtime: update documentation of thread limits (#3527)
- sync: do not recommend
join_allforBarrier(#3514) - sync: documentation for
oneshot(#3592) - sync: rename
notifytonotify_one(#3526) - time: fix typo in
Sleepdoc (#3515) - time: sync
interval.rsandtime/mod.rsdocs (#3533)
1.2.0 (February 5, 2021)
Added
- signal: make
Signal::poll_recvmethod public (#3383)
Fixed
- time: make
test-utilpaused time fully deterministic (#3492)
Documented
- sync: link to new broadcast and watch wrappers (#3504)
1.1.1 (January 29, 2021)
Forward ports 1.0.3 fix.
Fixed
- io: memory leak during shutdown (#3477).
1.1.0 (January 22, 2021)
Added
- net: add
try_read_bufandtry_recv_buf(#3351) - mpsc: Add
Sender::try_reservefunction (#3418) - sync: add
RwLocktry_readandtry_writemethods (#3400) - io: add
ReadBuf::inner_mut(#3443)
Changed
- macros: improve
select!error message (#3352) - io: keep track of initialized bytes in
read_to_end(#3426) - runtime: consolidate errors for context missing (#3441)
Fixed
Documented
- stream: link to new
Streamwrappers intokio-stream(#3343) - docs: mention that
test-utilfeature is not enabled with full (#3397) - process: add documentation to process::Child fields (#3437)
- io: clarify
AsyncFddocs about changes of the inner fd (#3430) - net: update datagram docs on splitting (#3448)
- time: document that
Sleepis notUnpin(#3457) - sync: add link to
PollSemaphore(#3456) - task: add
LocalSetexample (#3438) - sync: improve bounded
mpscdocumentation (#3458)
1.0.3 (January 28, 2021)
Fixed
- io: memory leak during shutdown (#3477).
1.0.2 (January 14, 2021)
Fixed
- io: soundness in
read_to_end(#3428).
1.0.1 (December 25, 2020)
This release fixes a soundness hole caused by the combination of RwLockWriteGuard::map
and RwLockWriteGuard::downgrade by removing the map function. This is a breaking
change, but breaking changes are allowed under our semver policy when they are required
to fix a soundness hole. (See this RFC for more.)
Note that we have chosen not to do a deprecation cycle or similar because Tokio 1.0.0 was released two days ago, and therefore the impact should be minimal.
Due to the soundness hole, we have also yanked Tokio version 1.0.0.
Removed
- sync: remove
RwLockWriteGuard::mapandRwLockWriteGuard::try_map(#3345)
Fixed
- docs: remove stream feature from docs (#3335)
1.0.0 (December 23, 2020)
Commit to the API and long-term support.
Fixed
- sync: spurious wakeup in
watch(#3234).
Changed
- io: rename
AsyncFd::with_io()totry_io()(#3306) - fs: avoid OS specific
*Exttraits in favor of conditionally defining the fn (#3264). - fs:
Sleepis!Unpin(#3278). - net: pass
SocketAddrby value (#3125). - net:
TcpStream::poll_peektakesReadBuf(#3259). - rt: rename
runtime::Builder::max_threads()tomax_blocking_threads()(#3287). - time: require
current_threadruntime when callingtime::pause()(#3289).
Removed
- remove
tokio::prelude(#3299). - io: remove
AsyncFd::with_poll()(#3306). - net: remove
{Tcp,Unix}Stream::shutdown()in favor ofAsyncWrite::shutdown()(#3298). - stream: move all stream utilities to
tokio-streamuntilStreamis added tostd(#3277). - sync: mpsc
try_recv()due to unexpected behavior (#3263). - tracing: make unstable as
tracing-coreis not 1.0 yet (#3266).
Added
- fs:
poll_*fns toDirEntry(#3308). - io:
poll_*fns toio::Lines,io::Split(#3308). - io:
_mutmethod variants toAsyncFd(#3304). - net:
poll_*fns toUnixDatagram(#3223). - net:
UnixStreamreadiness and non-blocking ops (#3246). - sync:
UnboundedReceiver::blocking_recv()(#3262). - sync:
watch::Sender::borrow()(#3269). - sync:
Semaphore::close()(#3065). - sync:
poll_recvfns tompsc::Receiver,mpsc::UnboundedReceiver(#3308). - time:
poll_tickfn totime::Interval(#3316).
0.3.6 (December 14, 2020)
Fixed
- rt: fix deadlock in shutdown (#3228)
- rt: fix panic in task abort when off rt (#3159)
- sync: make
add_permitspanic with usize::MAX >> 3 permits (#3188) - time: Fix race condition in timer drop (#3229)
- watch: fix spurious wakeup (#3244)
Added
0.3.5 (November 30, 2020)
Fixed
Added
0.3.4 (November 18, 2020)
Fixed
- stream:
StreamMapDefaultimpl bound (#3093). - io:
AsyncFd::into_inner()should deregister the FD (#3104).
Changed
- meta:
parking_lotfeature enabled withfull(#3119).
Added
- io:
AsyncWritevectored writes (#3149). - net: TCP/UDP readiness and non-blocking ops (#3130, #2743, #3138).
- net: TCP socket option (linger, send/recv buf size) (#3145, #3143).
- net: PID field in
UCredwith solaris/illumos (#3085). - rt:
runtime::Handleallows spawning onto a runtime (#3079). - sync:
Notify::notify_waiters()(#3098). - sync:
acquire_many(),try_acquire_many()toSemaphore(#3067).
0.3.3 (November 2, 2020)
Fixes a soundness hole by adding a missing Send bound to
Runtime::spawn_blocking().
Fixed
- rt: include missing
Send, fixing soundness hole (#3089). - tracing: avoid huge trace span names (#3074).
Added
- net:
TcpSocket::reuseport(),TcpSocket::set_reuseport()(#3083). - net:
TcpSocket::reuseaddr()(#3093). - net:
TcpSocket::local_addr()(#3093). - net: add pid to
UCred(#2633).
0.3.2 (October 27, 2020)
Adds AsyncFd as a replacement for v0.2's PollEvented.
Fixed
- io: fix a potential deadlock when shutting down the I/O driver (#2903).
- sync:
RwLockWriteGuard::downgrade()bug (#2957).
Added
- io:
AsyncFdfor receiving readiness events on raw FDs (#2903). - net:
poll_*function onUdpSocket(#2981). - net:
UdpSocket::take_error()(#3051). - sync:
oneshot::Sender::poll_closed()(#3032).
0.3.1 (October 21, 2020)
This release fixes an 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
- io:
copy_buf()(#2884). - io:
AsyncReadExt::read_buf(),AsyncReadExt::write_buf()for working withBuf/BufMut(#3003). - rt:
Runtime::spawn_blocking()(#2980). - sync:
watch::Sender::is_closed()(#2991).
0.3.0 (October 15, 2020)
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-coreandrt-utilare combined tortrt-threadedis renamed tort-multi-threadto match builder APItcp,udp,uds,dnsare combined tonet.parking_lotis included withfull
Changes
- meta: Minimum supported Rust version is now 1.45.
- io:
AsyncReadtrait now takesReadBufin order to safely handle reading into uninitialized memory (#2758). - io: Internal I/O driver storage is now able to compact (#2757).
- rt:
Runtime::block_onnow takes&self(#2782). - sync:
watchreworked to decouple receiving a change notification from receiving the value (#2814, #2806). - sync:
Notify::notifyis renamed tonotify_one(#2822). - process:
Child::killis now anasync fnthat cleans zombies (#2823). - sync: use
const fnconstructors as possible (#2833, #2790) - signal: reduce cross-thread notification (#2835).
- net: tcp,udp,uds types support operations with
&self(#2828, #2919, #2934). - sync: blocking
mpscchannel supportssendwith&self(#2861). - time: rename
delay_foranddelay_untiltosleepandsleep_until(#2826). - io: upgrade to
mio0.7 (#2893). - io:
AsyncSeektrait is tweaked (#2885). - fs:
Fileoperations take&self(#2930). - rt: runtime API, and
#[tokio::main]macro polish (#2876) - rt:
Runtime::enteruses an RAII guard instead of a closure (#2954). - net: the
from_stdfunction on all sockets no longer sets socket into non-blocking mode (#2893)
Added
- sync:
mapfunction to lock guards (#2445). - sync:
blocking_recvandblocking_sendfns tompscfor use outside of Tokio (#2685). - rt:
Builder::thread_name_fnfor configuring thread names (#1921). - fs: impl
FromRawFdandFromRawHandleforFile(#2792). - process:
Child::waitandChild::try_wait(#2796). - rt: support configuring thread keep-alive duration (#2809).
- rt:
task::JoinHandle::abortforcibly cancels a spawned task (#2474). - sync:
RwLockwrite guard to read guard downgrading (#2733). - net: add
poll_*functions that take&selfto all net types (#2845) - sync:
get_mut()forMutex,RwLock(#2856). - sync:
mpsc::Sender::closed()waits forReceiverhalf to close (#2840). - sync:
mpsc::Sender::is_closed()returns true ifReceiverhalf is closed (#2726). - stream:
iteranditer_muttoStreamMap(#2890). - net: implement
AsRawSocketon windows (#2911). - net:
TcpSocketcreates a socket without binding or listening (#2920).
Removed
- io: vectored ops are removed from
AsyncRead,AsyncWritetraits (#2882). - io:
miois removed from the public API.PollEventedandRegistrationare removed (#2893). - io: remove
bytesfrom public API.BufandBufMutimplementation are removed (#2908). - time:
DelayQueueis moved totokio-util(#2897).
Fixed
- io:
stdoutandstderrbuffering on windows (#2734).
0.2.22 (July 21, 2020)
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_oninside calls toblock_in_placethat are themselves insideblock_on(#2645) - net: fix non-portable behavior when dropping
TcpStreamOwnedWriteHalf(#2597) - io: improve stack usage by allocating large buffers on directly on the heap (#2634)
- io: fix unsound pin projection in
AsyncReadExt::read_bufandAsyncWriteExt::write_buf(#2612) - io: fix unnecessary zeroing for
AsyncReadimplementors (#2525) - io: Fix
BufReadernot correctly forwardingpoll_write_buf(#2654) - io: fix panic in
AsyncReadExt::read_line(#2541)
Changes
- coop: returning
Poll::Pendingno longer decrements the task budget (#2549)
Added
- io: little-endian variants of
AsyncReadExtandAsyncWriteExtmethods (#1915) - task: add
tracinginstrumentation to spawned tasks (#2655) - sync: allow unsized types in
MutexandRwLock(viadefaultconstructors) (#2615) - net: add
ToSocketAddrsimplementation for&[SocketAddr](#2604) - fs: add
OpenOptionsExtforOpenOptions(#2515) - fs: add
DirBuilder(#2524)
0.2.21 (May 13, 2020)
Fixes
- macros: disambiguate built-in
#[test]attribute in macro expansion (#2503) - rt:
LocalSetand task budgeting (#2462). - rt: task budgeting with
block_in_place(#2502). - sync: release
broadcastchannel memory without sending a value (#2509). - time: notify when resetting a
Delayto a time in the past (#2290)
Added
- io:
get_mut,get_ref, andinto_innertoLines(#2450). - io:
mio::Readyargument toPollEvented(#2419). - os: illumos support (#2486).
- rt:
Handle::spawn_blocking(#2501). - sync:
OwnedMutexGuardforArc<Mutex<T>>(#2455).
0.2.20 (April 28, 2020)
Fixes
- sync:
broadcastclosing the channel no longer requires capacity (#2448). - rt: regression when configuring runtime with
max_threadsless than number of CPUs (#2457).
0.2.19 (April 24, 2020)
Fixes
- docs: misc improvements (#2400, #2405, #2414, #2420, #2423, #2426, #2427, #2434, #2436, #2440).
- rt: support
block_in_placein 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
- rt:
runtime::Handle::block_on(#2437). - sync: owned
Semaphorepermit (#2421). - tcp: owned split (#2270).
0.2.18 (April 12, 2020)
Fixes
- task:
LocalSetwas incorrectly marked asSend(#2398) - io: correctly report
WriteZerofailure inwrite_int(#2334)
0.2.17 (April 9, 2020)
Fixes
- rt: bug in work-stealing queue (#2387)
Changes
- rt: threadpool uses logical CPU count instead of physical by default (#2391)
0.2.16 (April 3, 2020)
Fixes
- sync: fix a regression where
Mutex,Semaphore, andRwLockfutures no longer implementSync(#2375) - fs: fix
fs::copynot copying file permissions (#2354)
Added
0.2.15 (April 2, 2020)
Fixes
- rt: fix queue regression (#2362).
Added
- sync: Add disarm to
mpsc::Sender(#2358).
0.2.14 (April 1, 2020)
Fixes
- rt: concurrency bug in scheduler (#2273).
- rt: concurrency bug with shell runtime (#2333).
- test-util: correct pause/resume of time (#2253).
- time:
DelayQueuecorrect wakeup afterinsert(#2285).
Added
- io: impl
RawFd,AsRawHandlefor std io types (#2335). - rt: automatic cooperative task yielding (#2160, #2343, #2349).
- sync:
RwLock::into_inner(#2321).
Changed
- sync: semaphore, mutex internals rewritten to avoid allocations (#2325).
0.2.13 (February 28, 2020)
Fixes
- macros: unresolved import in
pin!(#2281).
0.2.12 (February 27, 2020)
Fixes
- net:
UnixStream::poll_shutdownshould callshutdown(Write)(#2245). - process: Wake up read and write on
EPOLLERR(#2218). - rt: potential deadlock when using
block_in_placeand shutting down the runtime (#2119). - rt: only detect number of CPUs if
core_threadsnot specified (#2238). - sync: reduce
watch::Receiverstruct size (#2191). - time: succeed when setting delay of
$MAX-1(#2184). - time: avoid having to poll
DelayQueueafter inserting new delay (#2217).
Added
- macros:
pin!variant that assigns to identifier and pins (#2274). - net: impl
StreamforListenertypes (#2275). - rt:
Runtime::shutdown_timeoutwaits for runtime to shutdown for specified duration (#2186). - stream:
StreamMapmerges streams and can insert / remove streams at runtime (#2185). - stream:
StreamExt::skip()skips a fixed number of items (#2204). - stream:
StreamExt::skip_while()skips items based on a predicate (#2205). - sync:
Notifyprovides basicasync/awaittask notification (#2210). - sync:
Mutex::into_innerretrieves guarded data (#2250). - sync:
mpsc::Sender::send_timeoutsends, waiting for up to specified duration for channel capacity (#2227). - time: impl
OrdandHashforInstant(#2239).
0.2.11 (January 27, 2020)
Fixes
- docs: misc fixes and tweaks (#2155, #2103, #2027, #2167, #2175).
- macros: handle generics in
#[tokio::main]method (#2177). - sync:
broadcastpotential lost notifications (#2135). - rt: improve "no runtime" panic messages (#2145).
Added
- optional support for using
parking_lotinternally (#2164). - fs:
fs::copy, an async version ofstd::fs::copy(#2079). - macros:
select!waits for the first branch to complete (#2152). - macros:
join!waits for all branches to complete (#2158). - macros:
try_join!waits for all branches to complete or the first error (#2169). - macros:
pin!pins a value to the stack (#2163). - net:
ReadHalf::poll()andReadHalf::poll_peak(#2151) - stream:
StreamExt::timeout()sets a per-item max duration (#2149). - stream:
StreamExt::fold()applies a function, producing a single value. (#2122). - sync: impl
Eq,PartialEqforoneshot::RecvError(#2168). - task: methods for inspecting the
JoinErrorcause (#2051).
0.2.10 (January 21, 2020)
Fixes
#[tokio::main]whenrt-corefeature flag is not enabled (#2139).- remove
AsyncBufReadfromBufStreamimpl block (#2108). - potential undefined behavior when implementing
AsyncReadincorrectly (#2030).
Added
BufStream::with_capacity(#2125).- impl
FromandDefaultforRwLock(#2089). io::ReadHalf::is_pair_ofchecks if providedWriteHalfis for the same underlying object (#1762, #2144).runtime::Handle::try_current()returns a handle to the current runtime (#2118).stream::empty()returns an immediately ready empty stream (#2092).stream::once(val)returns a stream that yields a single value:val(#2094).stream::pending()returns a stream that never becomes ready (#2092).StreamExt::chain()sequences a second stream after the first completes (#2093).StreamExt::collect()transform a stream into a collection (#2109).StreamExt::fuseends the stream after the firstNone(#2085).StreamExt::mergecombines two streams, yielding values as they become ready (#2091).- Task-local storage (#2126).
0.2.9 (January 9, 2020)
Fixes
AsyncSeekimpl forFile(#1986).- rt: shutdown deadlock in
threaded_scheduler(#2074, #2082). - rt: memory ordering when dropping
JoinHandle(#2044). - docs: misc API documentation fixes and improvements.
0.2.8 (January 7, 2020)
Fixes
- depend on new version of
tokio-macros.
0.2.7 (January 7, 2020)
Fixes
- potential deadlock when dropping
basic_schedulerRuntime. - calling
spawn_blockingfrom within aspawn_blocking(#2006). - storing a
Runtimeinstance in a thread-local (#2011). - miscellaneous documentation fixes.
- rt: fix
Waker::will_waketo return true when tasks match (#2045). - test-util:
time::advanceruns pending tasks before changing the time (#2059).
Added
net::lookup_hostmaps aT: ToSocketAddrsto a stream ofSocketAddrs(#1870).process::Childfields are made public to matchstd(#2014).- impl
Streamforsync::broadcast::Receiver(#2012). sync::RwLockprovides an asynchronous read-write lock (#1699).runtime::Handle::currentreturns the handle for the current runtime (#2040).StreamExt::filterfilters stream values according to a predicate (#2001).StreamExt::filter_mapsimultaneously filter and map stream values (#2001).StreamExt::try_nextconvenience for streams ofResult<T, E>(#2005).StreamExt::takelimits a stream to a specified number of values (#2025).StreamExt::take_whilelimits a stream based on a predicate (#2029).StreamExt::alltests if every element of the stream matches a predicate (#2035).StreamExt::anytests if any element of the stream matches a predicate (#2034).task::LocalSet.awaitruns spawned tasks until the set is idle (#1971).time::DelayQueue::lenreturns the number entries in the queue (#1755).- expose runtime options from the
#[tokio::main]and#[tokio::test](#2022).
0.2.6 (December 19, 2019)
Fixes
fs::File::seekAPI regression (#1991).
0.2.5 (December 18, 2019)
Added
io::AsyncSeektrait (#1924).Mutex::try_lock(#1939)mpsc::Receiver::try_recvandmpsc::UnboundedReceiver::try_recv(#1939).writevsupport forTcpStream(#1956).time::throttlefor throttling streams (#1949).- implement
Streamfortime::DelayQueue(#1975). sync::broadcastprovides a fan-out channel (#1943).sync::Semaphoreprovides an async semaphore (#1973).stream::StreamExtprovides stream utilities (#1962).
Fixes
- deadlock risk while shutting down the runtime (#1972).
- panic while shutting down the runtime (#1978).
sync::MutexGuarddebug output (#1961).- misc doc improvements (#1933, #1934, #1940, #1942).
Changes
- runtime threads are configured with
runtime::Builder::core_threadsandruntime::Builder::max_threads.runtime::Builder::num_threadsis deprecated (#1977).
0.2.4 (December 6, 2019)
Fixes
sync::Mutexdeadlock whenlock()future is dropped early (#1898).
0.2.3 (December 6, 2019)
Added
- read / write integers using
AsyncReadExtandAsyncWriteExt(#1863). read_buf/write_buffor reading / writingBuf/BufMut(#1881).TcpStream::poll_peek- pollable API for performing TCP peek (#1864).sync::oneshot::error::TryRecvErrorprovides variants to detect the error kind (#1874).LocalSet::block_onaccepts!'statictask (#1882).task::JoinErroris nowSync(#1888).- impl conversions between
tokio::time::Instantandstd::time::Instant(#1904).
Fixes
- calling
spawn_blockingafter runtime shutdown (#1875). LocalSetdrop infinite loop (#1892).LocalSethang under load (#1905).- improved documentation (#1865, #1866, #1868, #1874, #1876, #1911).
0.2.2 (November 29, 2019)
Fixes
- scheduling with
basic_scheduler(#1861). - update
spawnpanic message to specify that a task scheduler is required (#1839). - API docs example for
runtime::Builderto include a task scheduler (#1841). - general documentation (#1834).
- building on illumos/solaris (#1772).
- panic when dropping
LocalSet(#1843). - API docs mention the required Cargo features for
Builder::{basic, threaded}_scheduler(#1858).
Added
- impl
Streamforsignal::unix::Signal(#1849). - API docs for platform specific behavior of
signal::ctrl_candsignal::unix::Signal(#1854). - API docs for
signal::unix::Signal::{recv, poll_recv}andsignal::windows::CtrlBreak::{recv, poll_recv}(#1854). File::into_stdandFile::try_into_stdmethods (#1856).
0.2.1 (November 26, 2019)
Fixes
- API docs for
TcpListener::incoming,UnixListener::incoming(#1831).
Added
tokio::task::LocalSetprovides a strategy for spawning!Sendtasks (#1733).- export
tokio::time::Elapsed(#1826). - impl
AsRawFd,AsRawHandlefortokio::fs::File(#1827).
0.2.0 (November 26, 2019)
A major breaking change. Most implementation and APIs have changed one way or another. This changelog entry contains a highlight
Changed
- APIs are updated to use
async / await. - most
tokio-*crates are collapsed into this crate. - Scheduler is rewritten.
tokio::spawnreturns aJoinHandle.- A single I/O / timer is used per runtime.
- I/O driver uses a concurrent slab for allocating state.
- components are made available via feature flag.
- Use
bytes0.5 tokio::codecis moved totokio-util.
Removed
- Standalone
timerandnetdrivers are removed, useRuntimeinstead current_threadruntime is removed, usetokio::runtime::Runtimewithbasic_schedulerinstead.
0.1.21 (May 30, 2019)
Changed
- Bump
tokio-trace-coreversion to 0.2 (#1111).
0.1.20 (May 14, 2019)
Added
tokio::runtime::Builder::panic_handlerallows configuring handling panics on the runtime (#1055).
0.1.19 (April 22, 2019)
Added
- Re-export
tokio::sync::Mutexprimitive (#964).
0.1.18 (March 22, 2019)
Added
TypedExecutorre-export and implementations (#993).
0.1.17 (March 13, 2019)
Added
- Propagate trace subscriber in the runtime (#966).
0.1.16 (March 1, 2019)
Fixed
- async-await: track latest nightly changes (#940).
Added
sync::Watch, a single value broadcast channel (#922).- Async equivalent of read / write file helpers being added to
std(#896).
0.1.15 (January 24, 2019)
Added
0.1.14 (January 6, 2019)
- Use feature flags to break up the crate, allowing users to pick & choose components (#808).
- Export
UnixDatagramandUnixDatagramFramed(#772).
0.1.13 (November 21, 2018)
- Fix
Runtime::reactor()when no tasks are spawned (#721). runtime::Builderno longer uses deprecated methods (#749).- Provide
after_startandbefore_stopconfiguration settings forRuntime(#756). - Implement throttle stream combinator (#736).
0.1.12 (October 23, 2018)
- runtime: expose
keep_aliveon runtime builder (#676). - runtime: create a reactor per worker thread (#660).
- codec: fix panic in
LengthDelimitedCodec(#682). - io: re-export
tokio_io::io::readfunction (#689). - runtime: check for executor re-entry in more places (#708).
0.1.11 (September 28, 2018)
- Fix
tokio-async-awaitdependency (#675).
0.1.10 (September 27, 2018)
- Fix minimal versions
0.1.9 (September 27, 2018)
- Experimental async/await improvements (#661).
- Re-export
TaskExecutorfromtokio-current-thread(#652). - Improve
Runtimebuilder API (#645). tokio::runpanics when called from the context of an executor (#646).- Introduce
StreamExtwith atimeouthelper (#573). - Move
length_delimitedintotokio(#575). - Re-organize
tokio::netmodule (#548). - Re-export
tokio-current-thread::spawnin current_thread runtime (#579).
0.1.8 (August 23, 2018)
- Extract tokio::executor::current_thread to a sub crate (#370)
- Add
Runtime::block_on(#398) - Add
runtime::current_thread::block_on_all(#477) - Misc documentation improvements (#450)
- Implement
std::error::Errorfor error types (#501)
0.1.7 (June 6, 2018)
- Add
Runtime::block_onfor concurrent runtime (#391). - Provide handle to
current_thread::Runtimethat allows spawning tasks from other threads (#340). - Provide
clock::now(), a configurable source of time (#381).
0.1.6 (May 2, 2018)
- Add asynchronous filesystem APIs (#323).
- Add "current thread" runtime variant (#308).
CurrentThread: Expose innerParkinstance.- Improve fairness of
CurrentThreadexecutor (#313).
0.1.5 (March 30, 2018)
- Provide timer API (#266)
0.1.4 (March 22, 2018)
- Fix build on FreeBSD (#218)
- Shutdown the Runtime when the handle is dropped (#214)
- Set Runtime thread name prefix for worker threads (#232)
- Add builder for Runtime (#234)
- Extract TCP and UDP types into separate crates (#224)
- Optionally support futures 0.2.
0.1.3 (March 09, 2018)
- Fix
CurrentThread::turnto block on idle (#212).
0.1.2 (March 09, 2018)
- Introduce Tokio Runtime (#141)
- Provide
CurrentThreadfor more flexible usage of current thread executor (#141). - Add Lio for platforms that support it (#142).
- I/O resources now lazily bind to the reactor (#160).
- Extract Reactor to dedicated crate (#169)
- Add facade to sub crates and add prelude (#166).
- Switch TCP/UDP fns to poll_ -> Poll<...> style (#175)
0.1.1 (February 09, 2018)
- Doc fixes
0.1.0 (February 07, 2018)
- Initial crate released based on RFC.