broadcast::Receiver (#5925)WriteHalf::poll_write_vectored (#5914)This release bumps the MSRV of Tokio to 1.63. (#5887)
--cfg mio_unsupported_force_poll_poll flag (#5881)const_new methods always available (#5885)broadcast::Sender::new (#5824)UCred for espidf (#5868)File::options() (#5869)Interval (#5878){ChildStd*}::into_owned_{fd, handle} (#5899)broadcast::send (#5820)AsyncReadExt::read_exact (#5863)Sleep as !Unpin in docs (#5916)raw_arg not showing up in docs (#5865)block_in_place with a block_on between (#5837)Technically a breaking change, the Send implementation is removed from runtime::EnterGuard. This change fixes a bug and should not impact most users.
EnterGuard should not be Send (#5766)fs::read_dir (#5653)JoinSet (#5693)EnterGuard dropped incorrect order (#5772)File (#5803)broadcast::Receiver::blocking_recv (#5690)raw_arg method to Command (#5704)JoinSet::poll_join_next (#5721)Forward ports 1.18.6 changes.
This release fixes a mistake in the build script that makes AsFd implementations unavailable on Rust 1.63. (#5677)
AsyncFd::async_io (#5542)recv_buf for UdpSocket and UnixDatagram (#5583)OwnedSemaphorePermit::semaphore (#5618)same_channel to broadcast channel (#5607)watch::Receiver::wait_for (#5611)JoinSet::spawn_blocking and JoinSet::spawn_blocking_on (#5612)read_to_end not grow unnecessarily (#5610)RwLock (#5647)Notify (#5503)get_peer_cred on AIX (#5065)broadcast with custom wakers (#5578)Semaphore::MAX_PERMITS (#5645)tokio::sync::watch::Sender docs (#5587)This release bumps the MSRV of Tokio to 1.56. (#5559)
async_io helper method to sockets (#5512)AsFd/AsHandle/AsSocket (#5514, #5540)UdpSocket::peek_sender() (#5520)RwLockWriteGuard::{downgrade_map, try_downgrade_map} (#5527)JoinHandle::abort_handle (#5543)memchr from libc (#5558)#[tokio::main] (#5557)Interval returns Ready (#5553)ReadDir (#5555)spawn_blocking location fields (#5573)Wheel::poll() (#5574)tokio::io::copy[_buf] (#5575)ReaderStream and StreamReader in module docs (#5576)join! and try_join! (#5504)fs::try_exists (#4299)MappedOwnedMutexGuard (#5474)#[clippy::has_significant_drop] (#5422)Instant::now() perf with test-util (#5513)poll_fn in copy_bidirectional (#5486)notify_waiters calls atomic (#5458)blocking_* methods (#5448)process::Command docs (#5413)Forward ports 1.18.6 changes.
broadcast::Sender::len (#5343)Forward ports 1.18.5 changes.
ReadHalf::unsplit (#5375)This release fixes a compilation failure on targets without AtomicU64 when using rustc older than 1.63. (#5356)
AtomicU64 support detection (#5284)read_dir() by chunking operations (#5309)ThreadId implementation (#5329)spawn_blocking task is running (#5115)This release forward ports changes from 1.18.4.
ChildStdin (#5216)async fn ready() false positive for OS-specific events (#5231)yield_now defers task until after driver poll (#5223)winapi dependency with windows-sys (#5204)Handle::runtime_flavor (#5138)Mutex::blocking_lock_owned (#5130)Semaphore::MAX_PERMITS (#5144)merge() to semaphore permits (#4948)mpsc::WeakUnboundedSender (#5189)Command::process_group (#5114)task::id() and task::try_id() (#5171)LocalOwnedTasks (#5099)mark_pending called illegally (#5093)unsync_load on atomic types (#5175)LocalSet drop in thread local (#5179)CachePadded (#5106)tokio::io::copy continue filling the buffer when writer stalls (#5066)coop::budget from LocalSet::run_until (#5155)Notify panic safe (#5154)write_i8 to use signed integers (#5040)set_tos methods (#5073)UdpSocket::recv documentation (#5150)TryLockError for RwLock::try_write (#5160)timeout (#5118)timeout checks only before poll (#5126)oneshot::Receiver in docs (#5198)Mutex::new for globals (#5061)Option around mio::Events in io driver (#5078)io::handle refs with scheduler:Handle (#5128)scheduler::Handle (#5135)runtime::context module (#5140)driver.rs (#5141)runtime::context to unify thread-locals (#5143)coop mod into runtime (#5152)Runtime into its own file (#5159)Handle::enter (#5163)enter into context (#5167)CoreStage methods to Core (#5182)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)
LocalSet Drop (#4976)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.
device and bind_device methods to TCP/UDP sockets (#4882)tos and set_tos methods to TCP and UDP sockets (#4877)ServerOptions (#4845)mpsc::Sender::max_capacity method (#4904)mpsc::Sender (#4595)LocalSet::enter (#4765)JoinSet and AbortHandle (#4920)track_caller to public APIs (#4805, #4848, #4852)wasm32-wasi target (#4716)linked_list::Link impls (#4841)#[must_use] to lock guards (#4886)recv on closed and reopened broadcast channel (#4867)File::start_seek (#4897)poll_read (#4840)SignalKind methods const (#4956)basic_scheduler::Config (#4935)runtime module (#4942)AsyncSeekExt::rewind docs (#4893)try_read() for zero-length buffers (#4937)Builder::worker_threads (#4849)watch::Sender::send improved (#4959)JoinHandle (#4901)spawn_blocking (#4811)Interval::tick happens immediately (#4951)Builder::spawn_on (#4953)task::Builder::spawn* methods fallible (#4823)Forward ports 1.18.6 changes.
Forward ports 1.18.5 changes.
ReadHalf::unsplit (#5375)This release forward ports changes from 1.18.4.
This release removes the dependency on the once_cell crate to restore the MSRV of the 1.20.x LTS release. (#5048)
track_caller to public APIs (#4772, #4791, #4793, #4806, #4808)has_changed method to watch::Ref (#4758)src/time/driver/wheel/stack.rs (#4766)join_one to join_next (#4755)This release fixes another bug in Notified::enable. (#4751)
This release fixes a bug in Notified::enable. (#4747)
is_finished method for JoinHandle and AbortHandle (#4709)Notified::enable (#4705)watch::Sender::send_if_modified (#4591)take_error to TcpSocket and TcpStream (#4739)join! and try_join! (#4624)block_on (#4729)MissedTickBehavior::Burst (#4713)IoDriverMetrics (#4725)#[track_caller] to JoinSet/JoinMap (#4697)Builder::{spawn_on, spawn_local_on, spawn_blocking_on} (#4683)consume_budget for cooperative scheduling (#4498)join_set::Builder for configuring JoinSet tasks (#4687)JoinSet::join_one (#4726)ReadHalf::unsplit (#5375)This release removes the dependency on the once_cell crate to restore the MSRV of the 1.18.x LTS release. (#5048)
Add missing features for the winapi dependency. (#4663)
The 1.18.0 release broke the build for targets without 64-bit atomics when building with tokio_unstable. This release fixes that. (#4649)
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.
#[track_caller] for spawn_blocking (#4616)select macro to process 64 branches (#4519)try_io methods not calling Mio's try_io internally (#4582)UdpSocket::peer_addr (#4611)try_read_buf method for named pipes (#4626)SignalKind Hash/Eq impls and c_int conversion (#4540)SIGRTMAX (#4555)watch::Sender::send_modify method (#4310)broadcast::Receiver::len method (#4542)watch::Receiver::same_channel method (#4581)Clone for RecvError types (#4560)mio to 0.8.1 (#4582)tokio::select!'s internal util module (#4543)Vec::with_capacity when building runtime (#4553)tokio_unstable (#4524)Handle::current's docs to mention EnterGuard (#4567)Signal::recv is cancel-safe (#4634)UnboundedReceiver close docs (#4548)The following changes only apply when building with --cfg tokio_unstable:
task::Id type (#4630)AbortHandle type for cancelling tasks in a JoinSet (#4530, #4640)doc(cfg(...)) attributes for JoinSet (#4531)AbortHandle RustDoc (#4545)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.
sleep with large durations (#4495)Instant arithmetic on platforms where Instant::now is not monotonic (#4461)DuplexStream not participating in cooperative yielding (#4478)JoinHandle (#4430)parking_lot dependency to v0.12.0 (#4459)mio dependency to v0.8 (#4449)std::future::Ready instead of our own Ready future (#4271)atomic::spin_loop_hint with hint::spin_loop (#4491)tokio::process::ChildStdin (#4479)The following changes only apply when building with --cfg tokio_unstable:
tracing spans generated by spawn_local (#4483)JoinSet for managing sets of tasks (#4335)This release fixes a bug in #4428 with the change #4437.
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).
io::Take in edge case (#4428)File::write results in a write syscall when the runtime shuts down (#4316)wait_with_output (#4315)Send from parking_lot::*Guard (#4359)TcpSocket::linger() and set_linger() (#4324)UnwindSafe for socket types (#4384)UnwindSafe for JoinHandle (#4418)watch::Receiver::has_changed() (#4342)oneshot::Receiver::blocking_recv() (#4334)RwLock blocking operations (#4425)The following changes only apply when building with --cfg tokio_unstable
io::empty() (#4300)Interval::reset() (#4248)AsyncFdReadyGuard (#4267)Command::as_std() (#4295)tokio::sync types (#4302)mut patterns in select! (#4211)oneshot::Sender::send and awaiting a oneshot::Receiver when the oneshot has been closed (#4226)AtomicWaker panic safe (#3689)copy buffer size to match std::io::copy (#4209)oneshot::Sender::send and awaiting a oneshot::Receiver when the oneshot has been closed (#4226)Notify to clone the waker before locking its waiter list (#4129)poll_{recv,send}_ready methods to udp and uds_datagram (#4131)try_*, readable, writable, ready, and peer_addr methods to split halves (#4120)blocking_lock to Mutex (#4130)watch::Sender::send_replace (#3962, #4195)Debug for Mutex<T> impl to unsized T (#4134)copy_bidirectional that poll_write is sensible (#4125)select! (#4192)block_on wakeups better (#4157)try_join! (#4133)tokio/src/lib.rs (#4132)Interval::tick cancel safety (#4152)try_reserve error is consistent with try_send (#4119)spin_loop_hint instead of yield_now (#4115)SendError field public (#4097)AsyncSeekExt::rewind (#4107)block_on futures (#4094)try_recv for mpsc channels (#4113)poll_recv (#4117)PollSender impls Sink (#4110)yield_now (#4091)fill_buf by not calling poll_fill_buf twice (#4084)watch::Sender::subscribe (#3800)from_std to ChildStd* (#4045)(read|write)_f(32|64)[_le] methods (#4022)fill_buf and consume to AsyncBufReadExt (#3991)Child::raw_handle() on windows (#3998)--cfg docsrs (#4020)io::copy (#4001)spin_loop_hint instead of yield_now in mpsc (#4037)AsyncBufReadExt (#3997)watch::send fails (#4021)TcpStream (#3888)TaskLocal::scope (#3273)OnceCell (#3945)JoinError (#3959)This release backports two fixes from 1.9.0
Fixes a missed edge case from 1.8.1.
Forward ports 1.5.1 fixes.
JoinHandle::abort (#3934)get_{ref,mut} methods to AsyncFdReadyGuard and AsyncFdReadyMutGuard (#3807)BufWriter (#3163)NamedPipe{Client,Server} (#3866, #3899)watch::Receiver::borrow_and_update (#3813)From<T> for OnceCell<T> (#3877)tokio::task::Builder (#3881)UnixStream (#3898)Forward ports 1.5.1 fixes.
JoinHandle::abort (#3934)TcpSocket from std::net::TcpStream conversion (#3838)receiver_count to watch::Sender (#3729)sync::notify::Notified future publicly (#3840)clippy::default_numeric_fallback lint in generated code (#3831)mpsc::RecvError type (#3833)AsyncReadExt::read_buf (#3850)AsyncWrite::poll_write (#3820)Forward ports 1.5.1 fixes.
JoinHandle::abort (#3934)time:advance regression introduced in 1.6 (#3852)This release reverts #3518 because it doesn't work on some kernels due to a kernel bug. (#3803)
write_all_buf to AsyncWriteExt (#3737)AsyncSeek for BufReader, BufWriter, and BufStream (#3491)mpsc::Sender::{reserve_owned, try_reserve_owned} (#3704)MutexGuard::map method that returns a MappedMutexGuard (#2472)DuplexStream close (#3756)std::os::raw::c_int instead of libc::c_int on public API (#3774)notify_waiters (#3660)JoinHandle panic message (#3727)time::advance from going too far (#3712)net::unix::datagram module from docs (#3775)Barrier doc should use task, not thread (#3780)block_in_place (#3753)JoinHandle::abort (#3934)AsyncSeekExt::stream_position (#3650)AsyncWriteExt::write_vectored (#3678)copy_bidirectional utility (#3572)IntoRawFd for TcpSocket (#3684)OnceCell (#3591)OwnedRwLockReadGuard and OwnedRwLockWriteGuard (#3340)Semaphore::is_closed (#3673)mpsc::Sender::capacity (#3690)RwLock max reads (#3644)sync_scope for LocalKey (#3612)noalias attributes on intrusive linked list (#3654)JoinHandle::abort() when called from other threads (#3672)oneshot::try_recv (#3674)Semaphore permit overflow calculation (#3644)AsyncFd (#3635){Handle,Runtime}::block_on (#3628)Semaphore is fair (#3693)block_on future (#3582)EnterGuard with must_use (#3609)PollSender (#3613)Mutex FIFO explanation (#3615)unconstrained() opt-out (#3547)into_std for net types without it (#3509)same_channel method to mpsc::Sender (#3532){try_,}acquire_many_owned to Semaphore (#3535)RwLockWriteGuard::map and RwLockWriteGuard::try_map (#3348)oneshot::Receiver::close after successful try_recv (#3552)timeout(Duration::MAX) (#3551)read_until (#3536)AsyncRead::poll_read doc (#3557)UdpSocket splitting doc (#3517)LocalSet on new_current_thread (#3508)join_all for Barrier (#3514)oneshot (#3592)notify to notify_one (#3526)Sleep doc (#3515)interval.rs and time/mod.rs docs (#3533)Signal::poll_recv method public (#3383)test-util paused time fully deterministic (#3492)Forward ports 1.0.3 fix.
try_read_buf and try_recv_buf (#3351)Sender::try_reserve function (#3418)RwLock try_read and try_write methods (#3400)ReadBuf::inner_mut (#3443)select! error message (#3352)read_to_end (#3426)Stream wrappers in tokio-stream (#3343)test-util feature is not enabled with full (#3397)AsyncFd docs about changes of the inner fd (#3430)Sleep is not Unpin (#3457)PollSemaphore (#3456)LocalSet example (#3438)mpsc documentation (#3458)read_to_end (#3428).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.
RwLockWriteGuard::map and RwLockWriteGuard::try_map (#3345)Commit to the API and long-term support.
watch (#3234).AsyncFd::with_io() to try_io() (#3306)*Ext traits in favor of conditionally defining the fn (#3264).Sleep is !Unpin (#3278).SocketAddr by value (#3125).TcpStream::poll_peek takes ReadBuf (#3259).runtime::Builder::max_threads() to max_blocking_threads() (#3287).current_thread runtime when calling time::pause() (#3289).tokio::prelude (#3299).AsyncFd::with_poll() (#3306).{Tcp,Unix}Stream::shutdown() in favor of AsyncWrite::shutdown() (#3298).tokio-stream until Stream is added to std (#3277).try_recv() due to unexpected behavior (#3263).tracing-core is not 1.0 yet (#3266).poll_* fns to DirEntry (#3308).poll_* fns to io::Lines, io::Split (#3308)._mut method variants to AsyncFd (#3304).poll_* fns to UnixDatagram (#3223).UnixStream readiness and non-blocking ops (#3246).UnboundedReceiver::blocking_recv() (#3262).watch::Sender::borrow() (#3269).Semaphore::close() (#3065).poll_recv fns to mpsc::Receiver, mpsc::UnboundedReceiver (#3308).poll_tick fn to time::Interval (#3316).add_permits panic with usize::MAX >> 3 permits (#3188)StreamMap Default impl bound (#3093).AsyncFd::into_inner() should deregister the FD (#3104).parking_lot feature enabled with full (#3119).AsyncWrite vectored writes (#3149).UCred with solaris/illumos (#3085).runtime::Handle allows spawning onto a runtime (#3079).Notify::notify_waiters() (#3098).acquire_many(), try_acquire_many() to Semaphore (#3067).Fixes a soundness hole by adding a missing Send bound to Runtime::spawn_blocking().
Send, fixing soundness hole (#3089).TcpSocket::reuseport(), TcpSocket::set_reuseport() (#3083).TcpSocket::reuseaddr() (#3093).TcpSocket::local_addr() (#3093).UCred (#2633).Adds AsyncFd as a replacement for v0.2's PollEvented.
RwLockWriteGuard::downgrade() bug (#2957).AsyncFd for receiving readiness events on raw FDs (#2903).poll_* function on UdpSocket (#2981).UdpSocket::take_error() (#3051).oneshot::Sender::poll_closed() (#3032).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.
copy_buf() (#2884).AsyncReadExt::read_buf(), AsyncReadExt::write_buf() for working with Buf/BufMut (#3003).Runtime::spawn_blocking() (#2980).watch::Sender::is_closed() (#2991).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:
rt-core and rt-util are combined to rtrt-threaded is renamed to rt-multi-thread to match builder APItcp, udp, uds, dns are combined to net.parking_lot is included with fullAsyncRead trait now takes ReadBuf in order to safely handle reading into uninitialized memory (#2758).Runtime::block_on now takes &self (#2782).watch reworked to decouple receiving a change notification from receiving the value (#2814, #2806).Notify::notify is renamed to notify_one (#2822).Child::kill is now an async fn that cleans zombies (#2823).const fn constructors as possible (#2833, #2790)&self (#2828, #2919, #2934).mpsc channel supports send with &self (#2861).delay_for and delay_until to sleep and sleep_until (#2826).mio 0.7 (#2893).AsyncSeek trait is tweaked (#2885).File operations take &self (#2930).#[tokio::main] macro polish (#2876)Runtime::enter uses an RAII guard instead of a closure (#2954).from_std function on all sockets no longer sets socket into non-blocking mode (#2893)map function to lock guards (#2445).blocking_recv and blocking_send fns to mpsc for use outside of Tokio (#2685).Builder::thread_name_fn for configuring thread names (#1921).FromRawFd and FromRawHandle for File (#2792).Child::wait and Child::try_wait (#2796).task::JoinHandle::abort forcibly cancels a spawned task (#2474).RwLock write guard to read guard downgrading (#2733).poll_* functions that take &self to all net types (#2845)get_mut() for Mutex, RwLock (#2856).mpsc::Sender::closed() waits for Receiver half to close (#2840).mpsc::Sender::is_closed() returns true if Receiver half is closed (#2726).iter and iter_mut to StreamMap (#2890).AsRawSocket on windows (#2911).TcpSocket creates a socket without binding or listening (#2920).AsyncRead, AsyncWrite traits (#2882).mio is removed from the public API. PollEvented and Registration are removed (#2893).bytes from public API. Buf and BufMut implementation are removed (#2908).DelayQueue is moved to tokio-util (#2897).stdout and stderr buffering on windows (#2734).block_on inside calls to block_in_place that are themselves inside block_on (#2645)TcpStream OwnedWriteHalf (#2597)AsyncReadExt::read_buf and AsyncWriteExt::write_buf (#2612)AsyncRead implementors (#2525)BufReader not correctly forwarding poll_write_buf (#2654)AsyncReadExt::read_line (#2541)Poll::Pending no longer decrements the task budget (#2549)AsyncReadExt and AsyncWriteExt methods (#1915)tracing instrumentation to spawned tasks (#2655)Mutex and RwLock (via default constructors) (#2615)ToSocketAddrs implementation for &[SocketAddr] (#2604)OpenOptionsExt for OpenOptions (#2515)DirBuilder (#2524)#[test] attribute in macro expansion (#2503)LocalSet and task budgeting (#2462).block_in_place (#2502).broadcast channel memory without sending a value (#2509).Delay to a time in the past (#2290)get_mut, get_ref, and into_inner to Lines (#2450).mio::Ready argument to PollEvented (#2419).Handle::spawn_blocking (#2501).OwnedMutexGuard for Arc<Mutex<T>> (#2455).broadcast closing the channel no longer requires capacity (#2448).max_threads less than number of CPUs (#2457).block_in_place in more contexts (#2409, #2410).merge() and chain() when using size_hint() (#2430).runtime::Handle::block_on (#2437).Semaphore permit (#2421).LocalSet was incorrectly marked as Send (#2398)WriteZero failure in write_int (#2334)Mutex, Semaphore, and RwLock futures no longer implement Sync (#2375)fs::copy not copying file permissions (#2354)mpsc::Sender (#2358).DelayQueue correct wakeup after insert (#2285).RawFd, AsRawHandle for std io types (#2335).RwLock::into_inner (#2321).pin! (#2281).UnixStream::poll_shutdown should call shutdown(Write) (#2245).EPOLLERR (#2218).block_in_place and shutting down the runtime (#2119).core_threads not specified (#2238).watch::Receiver struct size (#2191).$MAX-1 (#2184).DelayQueue after inserting new delay (#2217).pin! variant that assigns to identifier and pins (#2274).Stream for Listener types (#2275).Runtime::shutdown_timeout waits for runtime to shutdown for specified duration (#2186).StreamMap merges streams and can insert / remove streams at runtime (#2185).StreamExt::skip() skips a fixed number of items (#2204).StreamExt::skip_while() skips items based on a predicate (#2205).Notify provides basic async / await task notification (#2210).Mutex::into_inner retrieves guarded data (#2250).mpsc::Sender::send_timeout sends, waiting for up to specified duration for channel capacity (#2227).Ord and Hash for Instant (#2239).#[tokio::main] method (#2177).broadcast potential lost notifications (#2135).parking_lot internally (#2164).fs::copy, an async version of std::fs::copy (#2079).select! waits for the first branch to complete (#2152).join! waits for all branches to complete (#2158).try_join! waits for all branches to complete or the first error (#2169).pin! pins a value to the stack (#2163).ReadHalf::poll() and ReadHalf::poll_peak (#2151)StreamExt::timeout() sets a per-item max duration (#2149).StreamExt::fold() applies a function, producing a single value. (#2122).Eq, PartialEq for oneshot::RecvError (#2168).JoinError cause (#2051).#[tokio::main] when rt-core feature flag is not enabled (#2139).AsyncBufRead from BufStream impl block (#2108).AsyncRead incorrectly (#2030).BufStream::with_capacity (#2125).From and Default for RwLock (#2089).io::ReadHalf::is_pair_of checks if provided WriteHalf is 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::fuse ends the stream after the first None (#2085).StreamExt::merge combines two streams, yielding values as they become ready (#2091).AsyncSeek impl for File (#1986).threaded_scheduler (#2074, #2082).JoinHandle (#2044).tokio-macros.basic_scheduler Runtime.spawn_blocking from within a spawn_blocking (#2006).Runtime instance in a thread-local (#2011).Waker::will_wake to return true when tasks match (#2045).time::advance runs pending tasks before changing the time (#2059).net::lookup_host maps a T: ToSocketAddrs to a stream of SocketAddrs (#1870).process::Child fields are made public to match std (#2014).Stream for sync::broadcast::Receiver (#2012).sync::RwLock provides an asynchronous read-write lock (#1699).runtime::Handle::current returns the handle for the current runtime (#2040).StreamExt::filter filters stream values according to a predicate (#2001).StreamExt::filter_map simultaneously filter and map stream values (#2001).StreamExt::try_next convenience for streams of Result<T, E> (#2005).StreamExt::take limits a stream to a specified number of values (#2025).StreamExt::take_while limits a stream based on a predicate (#2029).StreamExt::all tests if every element of the stream matches a predicate (#2035).StreamExt::any tests if any element of the stream matches a predicate (#2034).task::LocalSet.await runs spawned tasks until the set is idle (#1971).time::DelayQueue::len returns the number entries in the queue (#1755).#[tokio::main] and #[tokio::test] (#2022).fs::File::seek API regression (#1991).io::AsyncSeek trait (#1924).Mutex::try_lock (#1939)mpsc::Receiver::try_recv and mpsc::UnboundedReceiver::try_recv (#1939).writev support for TcpStream (#1956).time::throttle for throttling streams (#1949).Stream for time::DelayQueue (#1975).sync::broadcast provides a fan-out channel (#1943).sync::Semaphore provides an async semaphore (#1973).stream::StreamExt provides stream utilities (#1962).sync::MutexGuard debug output (#1961).runtime::Builder::core_threads and runtime::Builder::max_threads. runtime::Builder::num_threads is deprecated (#1977).sync::Mutex deadlock when lock() future is dropped early (#1898).AsyncReadExt and AsyncWriteExt (#1863).read_buf / write_buf for reading / writing Buf / BufMut (#1881).TcpStream::poll_peek - pollable API for performing TCP peek (#1864).sync::oneshot::error::TryRecvError provides variants to detect the error kind (#1874).LocalSet::block_on accepts !'static task (#1882).task::JoinError is now Sync (#1888).tokio::time::Instant and std::time::Instant (#1904).spawn_blocking after runtime shutdown (#1875).LocalSet drop infinite loop (#1892).LocalSet hang under load (#1905).basic_scheduler (#1861).spawn panic message to specify that a task scheduler is required (#1839).runtime::Builder to include a task scheduler (#1841).LocalSet (#1843).Builder::{basic, threaded}_scheduler (#1858).Stream for signal::unix::Signal (#1849).signal::ctrl_c and signal::unix::Signal (#1854).signal::unix::Signal::{recv, poll_recv} and signal::windows::CtrlBreak::{recv, poll_recv} (#1854).File::into_std and File::try_into_std methods (#1856).TcpListener::incoming, UnixListener::incoming (#1831).tokio::task::LocalSet provides a strategy for spawning !Send tasks (#1733).tokio::time::Elapsed (#1826).AsRawFd, AsRawHandle for tokio::fs::File (#1827).A major breaking change. Most implementation and APIs have changed one way or another. This changelog entry contains a highlight
async / await.tokio-* crates are collapsed into this crate.tokio::spawn returns a JoinHandle.bytes 0.5tokio::codec is moved to tokio-util.timer and net drivers are removed, use Runtime insteadcurrent_thread runtime is removed, use tokio::runtime::Runtime with basic_scheduler instead.tokio-trace-core version to 0.2 (#1111).tokio::runtime::Builder::panic_handler allows configuring handling panics on the runtime (#1055).tokio::sync::Mutex primitive (#964).TypedExecutor re-export and implementations (#993).sync::Watch, a single value broadcast channel (#922).std (#896).UnixDatagram and UnixDatagramFramed (#772).Runtime::reactor() when no tasks are spawned (#721).runtime::Builder no longer uses deprecated methods (#749).after_start and before_stop configuration settings for Runtime (#756).keep_alive on runtime builder (#676).LengthDelimitedCodec (#682).tokio_io::io::read function (#689).tokio-async-await dependency (#675).TaskExecutor from tokio-current-thread (#652).Runtime builder API (#645).tokio::run panics when called from the context of an executor (#646).StreamExt with a timeout helper (#573).length_delimited into tokio (#575).tokio::net module (#548).tokio-current-thread::spawn in current_thread runtime (#579).Runtime::block_on (#398)runtime::current_thread::block_on_all (#477)std::error::Error for error types (#501)Runtime::block_on for concurrent runtime (#391).current_thread::Runtime that allows spawning tasks from other threads (#340).clock::now(), a configurable source of time (#381).CurrentThread: Expose inner Park instance.CurrentThread executor (#313).CurrentThread::turn to block on idle (#212).CurrentThread for more flexible usage of current thread executor (#141).