Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
This PR contains the following updates:
0.1.7
->0.3.0
0.1.7
->0.3.0
Release Notes
tokio-rs/tokio (tokio)
v0.3.7
Compare Source
v0.3.6
: Tokio v0.3.6Compare Source
Released December 14, 2020
Fixed
add_permits
panic with usize::MAX >> 3 permits (#3188)Added
TcpStream::into_std
(#3189)v0.3.5
: Tokio v0.3.5Compare Source
Fixed
shutdown_timeout(0)
(#3196).Added
AsyncFd::with_interest()
(#3167).CtrlC
stream on windows (#3186).v0.3.4
: Tokio v0.3.4Compare Source
Fixed
StreamMap
Default
impl bound (#3093).AsyncFd::into_inner()
should deregister the FD (#3104).Changed
parking_lot
feature enabled withfull
(#3119).Added
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()
toSemaphore
(#3067).v0.3.3
: Tokio v0.3.3Compare Source
Fixes a soundness hole by adding a missing
Send
bound toRuntime::spawn_blocking()
.Fixed
Send
, fixing soundness hole (#3089).Added
TcpSocket::reuseport()
,TcpSocket::set_reuseport()
(#3083).TcpSocket::reuseaddr()
(#3093).TcpSocket::local_addr()
(#3093).UCred
(#2633).v0.3.2
: Tokio v0.3.2Compare Source
Adds
AsyncFd
as a replacement for v0.2'sPollEvented
.Fixed
RwLockWriteGuard::downgrade()
bug (#2957).Added
AsyncFd
for receiving readiness events on raw FDs (#2903).poll_*
function onUdpSocket
(#2981).UdpSocket::take_error()
(#3051).oneshot::Sender::poll_closed()
(#3032).v0.3.1
: Tokio v0.3.1Compare Source
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 crateis now on track to reach version 1.0 together with Tokio.
Fixed
Added
copy_buf()
(#2884).AsyncReadExt::read_buf()
,AsyncReadExt::write_buf()
for working withBuf
/BufMut
(#3003).Runtime::spawn_blocking()
(#2980).watch::Sender::is_closed()
(#2991).v0.3.0
: Tokio v0.3.0Compare Source
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:
changes.
combinations.
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
AsyncRead
trait now takesReadBuf
in order to safely handle readinginto uninitialized memory (#2758).
Runtime::block_on
now takes&self
(#2782).watch
reworked to decouple receiving a change notification fromreceiving the value (#2814, #2806).
Notify::notify
is renamed tonotify_one
(#2822).Child::kill
is now anasync fn
that cleans zombies (#2823).const fn
constructors as possible (#2833, #2790)&self
(#2828, #2919, #2934).mpsc
channel supportssend
with&self
(#2861).delay_for
anddelay_until
tosleep
andsleep_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).Added
map
function to lock guards (#2445).blocking_recv
andblocking_send
fns tompsc
for use outside of Tokio (#2685).Builder::thread_name_fn
for configuring thread names (#1921).FromRawFd
andFromRawHandle
forFile
(#2792).Child::wait
andChild::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()
forMutex
,RwLock
(#2856).mpsc::Sender::closed()
waits forReceiver
half to close (#2840).mpsc::Sender::is_closed()
returns true ifReceiver
half is closed (#2726).iter
anditer_mut
toStreamMap
(#2890).AsRawSocket
on windows (#2911).TcpSocket
creates a socket without binding or listening (#2920).Removed
AsyncRead
,AsyncWrite
traits (#2882).mio
is removed from the public API.PollEvented
andRegistration
areremoved (#2893).
bytes
from public API.Buf
andBufMut
implementation areremoved (#2908).
DelayQueue
is moved totokio-util
(#2897).Fixed
stdout
andstderr
buffering on windows (#2734).v0.2.25
Compare Source
v0.2.24
Compare Source
v0.2.23
: Tokio v0.2.23Compare Source
Maintenance release.
Fixes
unreachable_code
warning inselect!
(#2678)Changes
std::io
(#2606)parking_lot
dependency to 0.11.0 (#2676)read_to_end
andread_to_string
(#2560)block_on
(#2711)UnixListener::poll_accept
public (#2880)lazy_static
to1.4.0
(#3132)slab
to0.4.2
(#3132)Added
io::duplex()
as bidirectional reader/writer (#2661)into_split
onUnixDatagram
(#2557)split
andinto_split
(#2687)try_recv
/from
&try_send
/to
to UnixDatagram (#1677)UdpSocket::{try_send,try_send_to}
methods (#1979)ToSocketAddrs
for(String, u16)
(#2724)ReaderStream
(#2714)v0.2.22
: Tokio v0.2.22Compare Source
This release introduces initial support for [
tracing
][tracing] instrumentation within the Tokioruntime, enabled by the "tracing" feature flag. In addition, it contains a number of bug
fixes and API additions.
Fixes
#2624, #2600, #2623, #2622, #2577, #2569, #2589, #2575, #2540, #2564, #2567,
#2520, #2521, #2493)
block_on
inside calls toblock_in_place
that arethemselves inside
block_on
(#2645)TcpStream
OwnedWriteHalf
(#2597)(#2634)
AsyncReadExt::read_buf
andAsyncWriteExt::write_buf
(#2612)AsyncRead
implementors (#2525)BufReader
not correctly forwardingpoll_write_buf
(#2654)AsyncReadExt::read_line
(#2541)Changes
Poll::Pending
no longer decrements the task budget (#2549)Added
AsyncReadExt
andAsyncWriteExt
methods(#1915)
tracing
][tracing] instrumentation to spawned tasks (#2655)Mutex
andRwLock
(viadefault
constructors)(#2615)
ToSocketAddrs
implementation for&[SocketAddr]
(#2604)OpenOptionsExt
forOpenOptions
(#2515)DirBuilder
(#2524)Signed-off-by: Eliza Weisman [email protected]
v0.2.21
: Tokio v0.2.21Compare Source
Bug fixes and API polish.
Fixes
#[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).Added
get_mut
,get_ref
, andinto_inner
toLines
(#2450).mio::Ready
argument toPollEvented
(#2419).Handle::spawn_blocking
(#2501).OwnedMutexGuard
forArc<Mutex<T>>
(#2455).v0.2.20
: Tokio v0.2.20Compare Source
Fixes
broadcast
closing the channel no longer requires capacity (#2448).max_threads
less than the number of CPUs (#2457).v0.2.19
: Tokio v0.2.19Compare Source
Fixes
block_in_place
in more contexts (#2409, #2410).merge()
andchain()
when usingsize_hint()
(#2430).Added
runtime::Handle::block_on
(#2437).Semaphore
permit (#2421).v0.2.18
: Tokio v0.2.18Compare Source
Fixes a regression with
LocalSet
that allowed!Send
futures to cross threads.This change makes
LocalSet
!Send
. TheSend
implementation was accidentally added in v0.2.14. Removing theSend
implementation is not considered a breaking change as it fixes a soundness bug and the implementation was accidental.Fixes
LocalSet
was incorrectly marked asSend
(#2398)WriteZero
failure inwrite_int
(#2334)v0.2.17
: Tokio 0.2.17Compare Source
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
Changes
v0.2.16
: Tokio 0.2.16Compare Source
This release fixes a regression in
tokio::sync
and a bug intokio::fs::copy
. It alsoadds a new APIs to
tokio::time
andtokio::io
.Fixes
Mutex
,Semaphore
, andRwLock
futures nolonger implement
Sync
(#2375)fs::copy
not copying file permissions (#2354)Added
deadline
method todelay_queue::Expired
(#2300)StreamReader
(#2052)v0.2.15
: Tokio v0.2.15Compare Source
Fixes a queue regression and adds a new disarm fn to
mpsc::Sender
.Fixes
Added
mpsc::Sender
(#2358).v0.2.14
: Tokio v0.2.14Compare Source
This release introduces automatic cooperative task yielding. This article describes the new functionality in more detail.
Fixes
DelayQueue
correct wakeup afterinsert
(#2285).Added
RawFd
,AsRawHandle
for std io types (#2335).RwLock::into_inner
(#2321).Changed
v0.2.13
: Tokio v0.2.13Compare Source
Fixes a minor bug in the previous release that resulted in compilation errors using the new
pin!
form.Fixes
pin!
(#2281).v0.2.12
: Tokio v0.2.12Compare Source
Polish, small additions, and fixes. The biggest additions in this release are
StreamMap
andNotify
.StreamMap
Similar to
StreamExt::merge
,StreamMap
supports merging multiple source streams into a single stream, producing items as they become available in the source streams. However,StreamMap
supports inserting and removing streams at run-time. This is useful for cases where a consumer wishes to subscribe to messages from multiple sources and dynamically manage those subscriptions.As the name implies,
StreamMap
maps keys to streams. Streams are [inserted] or [removed] as needed and then theStreamMap
is used as any other stream. Items are returned with their keys, enabling the caller to identify which source stream the item originated from.Example
Notify
Notify
is the next step in providingasync / await
based synchronization primitives. It is similar to howthread::park() / unpark()
work, but for asynchronous tasks. Consumers await notifications and producers notify consumers.Notify
is intended to be used as a building block for higher level synchronization primitives, such as channels.Examples
Basic usage.
Here is how
Notify
can be used as a building block for an unbounded channel.Changes
Fixes
UnixStream::poll_shutdown
should callshutdown(Write)
(#2245).EPOLLERR
(#2218).block_in_place
and shutting down theruntime (#2119).
core_threads
not specified (#2238).watch::Receiver
struct size (#2191).$MAX-1
(#2184).DelayQueue
after inserting new delay (#2217).Added
pin!
variant that assigns to identifier and pins (#2274).Stream
forListener
types (#2275).Runtime::shutdown_timeout
waits for runtime to shutdown for specifiedduration (#2186).
StreamMap
merges streams and can insert / remove streams atruntime (#2185).
StreamExt::skip()
skips a fixed number of items (#2204).StreamExt::skip_while()
skips items based on a predicate (#2205).Notify
provides basicasync
/await
task notification (#2210).Mutex::into_inner
retrieves guarded data (#2250).mpsc::Sender::send_timeout
sends, waiting for up to specified durationfor channel capacity (#2227).
Ord
andHash
forInstant
(#2239).v0.2.11
: Tokio v0.2.11Compare Source
Introduces [
select!
][select!], [join!
][join!], and [try_join!
][try_join!] macros for waiting on multiple async operations concurrently from the same task. These macros are implemented primarily as declarative macros, which works around the recursion limit issue. Theselect!
macro works with any type that implementsFuture
and does not require specialFusedFuture
traits.Fixes
#[tokio::main]
method (#2177).broadcast
potential lost notifications (#2135).Added
parking_lot
internally (#2164).fs::copy
, an async version ofstd::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()
andReadHalf::poll_peak
(#2151)StreamExt::timeout()
sets a per-item max duration (#2149).StreamExt::fold()
applies a function, producing a single value. (#2122).Eq
,PartialEq
foroneshot::RecvError
(#2168).JoinError
cause (#2051).v0.2.10
: Tokio v0.2.10Compare Source
Introduces a task-local storage solution that works with Rust's "task" concept and supports multiplexing futures on the same runtime task (#2126). A number of other incremental improvements are included.
This release includes a few fixes, including fixing a scenario in which undefined behavior could be introduced when the user provided a buggy
AsyncRead
implementation.Fixes
#[tokio::main]
whenrt-core
feature flag is not enabled (#2139).AsyncBufRead
fromBufStream
impl block (#2108).AsyncRead
incorrectly (#2030).Added
BufStream::with_capacity
(#2125).From
andDefault
forRwLock
(#2089).io::ReadHalf::is_pair_of
checks if providedWriteHalf
is for the sameunderlying 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 firstNone
(#2085).StreamExt::merge
combines two streams, yielding values as they become ready (#2091).v0.2.9
: Tokio v0.2.9Compare Source
Includes only fixes.
Fixes
AsyncSeek
impl forFile
(#1986).threaded_scheduler
(#2074, #2082).JoinHandle
(#2044).v0.2.8
: Tokio v0.2.8Compare Source
A breaking change was accidentally introduced in tokio-macros. The breaking change was reverted and Tokio v0.2.8 depends on the correct version of tokio-macros.
Fixes
tokio-macros
.v0.2.7
: Tokio v0.2.7Compare Source
This release includes both bug fixes and incremental improvements across most of Tokio. The primary bug fixes are to
Runtime
configured withbasic_scheduler
andtask::LocalSet
.Fixes
basic_scheduler
Runtime.spawn_blocking
from within aspawn_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).Added
net::lookup_host
maps aT: ToSocketAddrs
to a stream ofSocketAddrs
(#1870).process::Child
fields are made public to matchstd
(#2014).Stream
forsync::broadcast::Receiver
(#2012).sync::RwLock
provides an asynchonous 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 ofResult<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).v0.2.6
: Tokio v0.2.6Compare Source
This release fixes an API regression introduced as part of v0.2.5.
Fixes
fs::File::seek
API regression (#1991).v0.2.5
: Tokio v0.2.5Compare Source
Includes new APIs, utilities, and fixes. Some highlights:
tokio::sync::broadcast
A multi-producer, multi-consumer channel where each sent value is sent to all consumers (fan-out). The channel is bounded and when consumers lag, they will receive an error indicating they have lagged too far behind.
Senders never block. When the channel is full, the oldest value still held by the channel is overwritten. This tends to be the desired behavior in order to prevent slow consumers from blocking the entire system. However, you can use a
Semaphore
(also added in this release) to ensure that all consumers see all messages.tokio::sync::Semaphore
A counting synchronization primitive. It is used to limit a critical section to 1 or more concurrent tasks. For example, assume we wish to limit the number of in-flight database queries, we could do something like:
There may be any number of concurrent calls to
query
, but the semaphore will limit the number that are able to concurrently perform the query.Added
io::AsyncSeek
trait (#1924).Mutex::try_lock
(#1939)mpsc::Receiver::try_recv
andmpsc::UnboundedReceiver::try_recv
(#1939).writev
support forTcpStream
(#1956).time::throttle
for throttling streams (#1949).Stream
fortime::DelayQueue
(#1975).sync::broadcast
provides a fan-out channel (#1943).sync::Semaphore
provides an async semaphore (#1973).stream::StreamExt
provides stream utilities (#1962).Fixes
sync::MutexGuard
debug output (#1961).Changes
runtime::Builder::core_threads
andruntime::Builder::max_threads
.runtime::Builder::num_threads
isdeprecated (#1977).
v0.2.4
: Tokio v0.2.4Compare Source
A small release to fix a potential deadlock when using
Mutex
.Fixes
sync::Mutex
deadlock whenlock()
future is dropped early (#1898).v0.2.3
: Tokio v0.2.3Compare Source
Mostly a bug fix, doc improvement, and polish release. The biggest new addition are the new helpers to read and write integers. They are on [
AsyncReadExt
][AsyncReadExt] and [AsyncWriteExt
][AsyncWriteExt] and can make protocol encoding / decoding easier. For example, working with length delimited payloads might look like:Added
AsyncReadExt
andAsyncWriteExt
(#1863).read_buf
/write_buf
for reading / writingBuf
/BufMut
(#1881).TcpStream::poll_peek
- pollable API for performing TCP peek (#1864).sync::oneshot::error::TryRecvError
provides variants to detect the errorkind (#1874).
LocalSet::block_on
accepts!'static
task (#1882).task::JoinError
is nowSync
(#1888).tokio::time::Instant
andstd::time::Instant
(#1904).Fixes
spawn_blocking
after runtime shutdown (#1875).LocalSet
drop inifinite loop (#1892).LocalSet
hang under load (#1905).v0.2.2
: Tokio v0.2.2Compare Source
Primarily a release fix for
basic_scheduler
andtask::LocalSet
.task::LocalSet
was introduced in v0.2.1 and provides tooling to run!Send
tasks. Thetask::LocalSet
structure replaces the need to have separate runtimes. The advantage being that it can be used with the threaded runtime in order to run bothSend
futures across multiple threads and!Send
futures on the current thread.Fixes
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_scheduler
andBuilder::threaded_scheduler
(#1858).Added
Stream
forsignal::unix::Signal
(#1849).signal::ctrl_c
andsignal::unix::Signal
(#1854).signal::unix::Signal::{recv, poll_recv}
andsignal::windows::CtrlBreak::{recv, poll_recv}
(#1854).File::into_std
andFile::try_into_std
methods (#1856).v0.2.1
: Tokio v0.2.1Compare Source
Fixes
TcpListener::incoming
,UnixListener::incoming
(#1831).Added
tokio::task::LocalSet
provides a strategy for spawning!Send
tasks (#1733).tokio::time::Elapsed
(#1826).AsRawFd
,AsRawHandle
fortokio::fs::File
(#1827).v0.2.0
: Tokio v0.2.0Compare Source
A major breaking change. Most implementation and APIs have changed one way or
another. This changelog entry contains a highlight
Changed
async / await
.tokio-*
crates are collapsed into this crate.tokio::spawn
returns aJoinHandle
.bytes
0.5tokio::codec
is moved totokio-util
.Removed
timer
andnet
drivers are removed, useRuntime
insteadcurrent_thread
runtime is removed, usetokio::runtime::Runtime
withbasic_scheduler
instead.v0.1.22
Compare Source
v0.1.21
Compare Source
v0.1.20
Compare Source
v0.1.19
Compare Source
v0.1.18
Compare Source
v0.1.17
Compare Source
v0.1.16
Compare Source
v0.1.15
Compare Source
[
v0.1.14
](https://redirect.github.com/tokio-rs/tConfiguration
📅 Schedule: Branch creation - At any time (no schedule defined), Automerge - At any time (no schedule defined).
🚦 Automerge: Disabled by config. Please merge this manually once you are satisfied.
♻ Rebasing: Whenever PR is behind base branch, or you tick the rebase/retry checkbox.
🔕 Ignore: Close this PR and you won't be reminded about these updates again.
This PR was generated by Mend Renovate. View the repository job log.