Update Rust crate async-std to ^1.12.0 #28
Merged
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:
^1->^1.12.0Release Notes
async-rs/async-std (async-std)
v1.12.0Compare Source
Added
std::task::spawn_blockingis now stabilized. We consider it a fundamental API for bridging between blocking code and async code, and we widely use it within async-std's own implementation.TryFromimplementations to convertTcpListener,TcpStream,UdpSocket,UnixDatagram,UnixListener, andUnixStreamto their synchronous equivalents, including putting them back into blocking mode.Changed
num_cpus; it uses functionality in the standard library instead (viaasync-global-executor).v1.11.0Compare Source
This release improves compile times by up to 55% on initial builds, and up to 75% on recompilation. Additionally we've added a few new APIs and made some tweaks.
Added
TcpListener::into_incomingto convert aTcpListenerinto a stream of incoming TCP connectionsRemoved
extension_traitmacro had been removed. This drastically improves compile times forasync-std, but changes the way our documentation is rendered. This is a cosmetic change only, and all existing code should continue to work as it did before.Changed
Docs
v1.10.0Compare Source
This release comes with an assortment of small features and fixes.
Added
Filenow implementsCloneso thatFiles can be passed into closures for use inspawn_blocking.File's contents are already wrapped inArcs, so the implementation ofCloneis straightforward.task::try_current()which returns a handle to the current task if called within the context of a task created by async-std.async_std::ionow re-exportsWriteExtdirectly.Fixed
write!now takes already written bytes into account onFile.Internal
TcpStreamnow properly makes use of vectored IO.net::*::Incomingimplementations now do less allocation.Docs
v1.9.0Compare Source
This patch stabilizes the
async_std::channelsubmodule, removes thedeprecated
sync::channeltypes, and introduces thetokio1feature.New Channels
As part of our
1.8.0release last month we introduced the newasync_std::channelsubmodule and deprecated the unstableasync_std::sync::channeltypes. You can read our full motivation for thischange in the last patch notes. But the short version is that the old
channels had some fundamental problems, and the
syncsubmodule is a bit ofa mess.
This release of
async-stdpromotesasync_std::channelto stable, andfully removes the
async_std::sync::channeltypes. In practice manylibraries have already been upgraded to the new channels in the past month,
and this will enable much of the ecosystem to switch off "unstable" versions
of
async-std.Tokio 1.0 compat
The Tokio project recently released version 1.0 of their runtime, and the
async-std team would like to congratulate the Tokio team on achieving this
milestone.
This release of
async-stdadds thetokio1feature flag, enabling Tokio'sTLS constructors to be initialized within the
async-stdruntime. This is inaddition to the
tokio02andtokio03feature flags which we were alreadyexposing.
In terms of stability it's worth noting that we will continue to provide
support for the
tokio02,tokio03, andtokio1on the current majorrelease line of
async-std. These flags are part of our public API, andremoving compat support for older Tokio versions is considered a breaking
change.
Added
tokio1feature (#924)async_std::channelsubmodule (#934)Removed
sync::channel(#933)Fixed
FuturesExttrait (#930)cargo-editin the installation section of the docs (#932)Internal
randto 0.8 (#923)RwLockandBarrierto use theasync-lockcrate internally (#925)compare_and_swapmethod withcompare_exchange(#927)v1.8.0Compare Source
This patch introduces
async_std::channel, a new submodule for our async channels implementation.channelshave been one of async-std's most requested features, and have existed as "unstable" for the past year. We've been cautious about stabilizing channels, and this caution turned out to be warranted: we realized our channels could hang indefinitely under certain circumstances, and people ended up expressing a need for unbounded channels.So today we're introducing the new
async_std::channelsubmodule which exports theasync-channelcrate, and we're marking the older unstableasync_std::sync::channelAPI as "deprecated". This release includes both APIs, but we intend to stabilizeasync_std::channeland remove the older API in January. This should give dependent projects a month to upgrade, though we can extend that if it proves to be too short.The rationale for adding a new top-level
channelsubmodule, rather than extendingsyncis that thestd::syncandasync_std::syncsubmodule are a bit of a mess, and the libs teamhttps://togithub.com/rust-lang/rfcs/pull/2788#discussion_r339092478b.com/rust-lang/rfcs/pull/2788#discussion_r339092478)) into separate modules. The stdlib has to guarantee it'll forever be backwards compatible, butasync-stddoes not (we fully expect a 2.0 once we have async closures & traits). So we're experimenting with this change beforestddoes, with the expectation that this change can serve as a data point when the libs team decides how to proceed in std.Added
async_std::channelas "unstable" #915async_std::processas "unstable" #916Fixed
tokio03flags in the docs #909StreamExt::cycle#903Internal
pin-projecttov0.2.0v1.7.0Compare Source
This patch adds a feature to enable compatibility with the new
tokio0.3.0release, and updates internal dependencies.
Added
tokio03feature (#895)Internal
v1.6.5Compare Source
Fixed
TcpListener::incoming. (#889)v1.6.4Compare Source
Added
UdpSocket::peekandUdpSocket::peek_from(#853)Changed
Extracted the executor into async-global-executor (#867)
Updated various dependencies
Fixed
UnixStream::into_raw_fddoesn't close the file descriptor (#855)v1.6.3Added
Changed
Muteximplementation withasync-mutex. (#822)Fixed
Sendguards toStream::collect. (#665)v1.6.2Added
UdpSocket::peer_addr(#816)Changed
Fixed
flattenandflat_map(#701)v1.6.1Compare Source
Added
tokio02feature flag, to allow compatibility usage with tokio@0.2 (#804).Changed
stdiolock methods, due to their unsoundness (#807).Fixed
block_on(#799) and (#809).defaultfeature requirement for theunstablefeature (#806).v1.6.0Compare Source
See
1.6.0-beta.1and1.6.0-beta.2.v1.5.0Compare Source
API Documentation
This patch includes various quality of life improvements to async-std.
Including improved performance, stability, and the addition of various
Cloneimpls that replace the use ofArcin many cases.Added
FromStreamforResult<T, E>(#643)stream::pendingas "unstable" (#615)stream::timeoutto document the error flow (#675)CloneforDirEntry(#682)CloneforTcpStream(#689)Changed
stream::Interval(#645)stream::FlatMap(#651)1.0.0(#681)async-taskto 1.2.1 (#676)task::block_onnow parks after a single poll, improving performance in many cases (#684)take_whileinstead ofscaninimplofProduct,SumandFromStream(#667)TcpStream::connectno longer uses a thread from the threadpool, improving performance (#687)Fixed
UdpSocket::recv(#648)UdpSocket::send(#671)sync::JoinHandledocumentation (#659)std::error::Error::descriptionwhich failed CI (#661)format_code_in_doc_commentsoption which failed CI (#685)task::sleepexample (#688)v1.4.0Compare Source
API Documentation
This patch adds
Future::timeout, providing a method counterpart to thefuture::timeoutfree function. And includes several bug fixes around missingAPIs. Notably we're not shipping our new executor yet, first announced on our
blog.
Examples
Added
Future::timeoutas "unstable" (#600)Fixes
streamsubmodule documentation (#621)Write::write_fmt's future is now correctly marked as#[must_use](#628)io::Bytesexport (#633)io::Chainexport (#633)io::Takeexport (#633)v1.3.0Compare Source
API Documentation
This patch introduces
Stream::delay, more methods onDoubleEndedStream,and improves compile times.
Stream::delayis a new API that's similar totask::sleep,but can be passed as part of as stream, rather than as a separate block. This is
useful for examples, or when manually debugging race conditions.
Examples
Added
Stream::delayas "unstable" (#309)DoubleEndedStream::next_backas "unstable" (#562)DoubleEndedStream::nth_backas "unstable" (#562)DoubleEndedStream::rfindas "unstable" (#562)DoubleEndedStream::rfoldas "unstable" (#562)DoubleEndedStream::try_rfoldas "unstable" (#562)stream::Oncenow implementsDoubleEndedStream(#562)stream::FromIternow implementsDoubleEndedStream(#562)Changed
async-macros, speeding up compilation (#610)Fixes
UdpSocket::recvexample (#603)task::block_on(#608)task::Builder(#612)futures-preview(#595)<TcpStream as Write>::poll_closenow closes the write half of the stream (#618)v1.2.0Compare Source
API Documentation
This patch includes some minor quality-of-life improvements, introduces a
new
Stream::unzipAPI, and adds verbose errors to our networking types.This means if you can't connect to a socket, you'll never have to wonder again
which address it was you couldn't connect to, instead of having to go through
the motions to debug what the address was.
Example
Unzip a stream of tuples into two collections:
Added
Stream::unzipas "unstable".Changed
Future::joinandFuture::try_joincan now join futures with differentoutput types.
Fixed
Debugoutput ofBufWriter.Stream::throttlethat made it consume too much CPU.v1.1.0Compare Source
API Documentation
This patch introduces a faster scheduler algorithm,
Stream::throttle, andstabilizes
task::yield_now. Additionally we're introducing several more streamAPIs, bringing us to almost complete parity with the standard library.
Furthermore our
pathsubmodule now returns more context in errors. So ifopening a file fails, async-std will tell you which file was failed to open,
making it easier to write and debug programs.
Examples
Added
Stream::throttleas "unstable".Stream::countas "unstable".Stream::maxas "unstable".Stream::successorsas "unstable".Stream::by_refas "unstable".Stream::partitionas "unstable".pathsubmodule.os::windows::symlink_diras "unstable".os::windows::symlink_fileas "unstable".task::yield_now.Fixes
readcalls onFile.Stream::max_by_keywas returning the wrong result.Stream::min_by_keywas returning the wrong result.Changed
Unpinbound fromstream::Once.pin_mut!.Stream::anyandStream::all's internals.surfexample is now enabled again.futures-timerto 2.0.0, improving compilation speed.async-macrosto 2.0.0.Stream::mergenow uses randomized ordering to reduce overall latency.run. This is similar to Go's scheduler, and Tokio's scheduler.
channeltypes to link back to thechannelfunction.
v1.0.1Compare Source
API Documentation
We were seeing a regression in our fs performance, caused by too many
long-running tasks. This patch fixes that regression by being more proactive
about closing down idle threads.
Changes
task::spawn_blocking.Configuration
📅 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 becomes conflicted, or you tick the rebase/retry checkbox.
🔕 Ignore: Close this PR and you won't be reminded about this update again.
This PR has been generated by Mend Renovate. View repository job log here.