mirror of
https://github.com/tokio-rs/tokio.git
synced 2026-08-27 00:00:12 +02:00
30 KiB
30 KiB
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
- net: fix use-after-free (#3019).
- fs: ensure buffered data is written on shutdown (#3009).
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 combied 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 asynchonous 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 inifinite 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.