Debian Codegraph @

third_party/rust/tokio/CHANGELOG.md

raw
1 # 1.39.2 (July 27th, 2024)
2
3 This release fixes a regression where the `select!` macro stopped accepting
4 expressions that make use of temporary lifetime extension. ([#6722])
5
6 [#6722]: https://github.com/tokio-rs/tokio/pull/6722
7
8 # 1.39.1 (July 23rd, 2024)
9
10 This release reverts "time: avoid traversing entries in the time wheel twice"
11 because it contains a bug. ([#6715])
12
13 [#6715]: https://github.com/tokio-rs/tokio/pull/6715
14
15 # 1.39.0 (July 23rd, 2024)
16
17 Yanked. Please use 1.39.1 instead.
18
19 - This release bumps the MSRV to 1.70. ([#6645])
20 - This release upgrades to mio v1. ([#6635])
21 - This release upgrades to windows-sys v0.52 ([#6154])
22
23 ### Added
24
25 - io: implement `AsyncSeek` for `Empty` ([#6663])
26 - metrics: stabilize `num_alive_tasks` ([#6619], [#6667])
27 - process: add `Command::as_std_mut` ([#6608])
28 - sync: add `watch::Sender::same_channel` ([#6637])
29 - sync: add `{Receiver,UnboundedReceiver}::{sender_strong_count,sender_weak_count}` ([#6661])
30 - sync: implement `Default` for `watch::Sender` ([#6626])
31 - task: implement `Clone` for `AbortHandle` ([#6621])
32 - task: stabilize `consume_budget` ([#6622])
33
34 ### Changed
35
36 - io: improve panic message of `ReadBuf::put_slice()` ([#6629])
37 - io: read during write in `copy_bidirectional` and `copy` ([#6532])
38 - runtime: replace `num_cpus` with `available_parallelism` ([#6709])
39 - task: avoid stack overflow when passing large future to `block_on` ([#6692])
40 - time: avoid traversing entries in the time wheel twice ([#6584])
41 - time: support `IntoFuture` with `timeout` ([#6666])
42 - macros: support `IntoFuture` with `join!` and `select!` ([#6710])
43
44 ### Fixed
45
46 - docs: fix docsrs builds with the fs feature enabled ([#6585])
47 - io: only use short-read optimization on known-to-be-compatible platforms ([#6668])
48 - time: fix overflow panic when using large durations with `Interval` ([#6612])
49
50 ### Added (unstable)
51
52 - macros: allow `unhandled_panic` behavior for `#[tokio::main]` and `#[tokio::test]` ([#6593])
53 - metrics: add `spawned_tasks_count` ([#6114])
54 - metrics: add `worker_park_unpark_count` ([#6696])
55 - metrics: add worker thread id ([#6695])
56
57 ### Documented
58
59 - io: update `tokio::io::stdout` documentation ([#6674])
60 - macros: typo fix in `join.rs` and `try_join.rs` ([#6641])
61 - runtime: fix typo in `unhandled_panic` ([#6660])
62 - task: document behavior of `JoinSet::try_join_next` when all tasks are running ([#6671])
63
64 [#6114]: https://github.com/tokio-rs/tokio/pull/6114
65 [#6154]: https://github.com/tokio-rs/tokio/pull/6154
66 [#6532]: https://github.com/tokio-rs/tokio/pull/6532
67 [#6584]: https://github.com/tokio-rs/tokio/pull/6584
68 [#6585]: https://github.com/tokio-rs/tokio/pull/6585
69 [#6593]: https://github.com/tokio-rs/tokio/pull/6593
70 [#6608]: https://github.com/tokio-rs/tokio/pull/6608
71 [#6612]: https://github.com/tokio-rs/tokio/pull/6612
72 [#6619]: https://github.com/tokio-rs/tokio/pull/6619
73 [#6621]: https://github.com/tokio-rs/tokio/pull/6621
74 [#6622]: https://github.com/tokio-rs/tokio/pull/6622
75 [#6626]: https://github.com/tokio-rs/tokio/pull/6626
76 [#6629]: https://github.com/tokio-rs/tokio/pull/6629
77 [#6635]: https://github.com/tokio-rs/tokio/pull/6635
78 [#6637]: https://github.com/tokio-rs/tokio/pull/6637
79 [#6641]: https://github.com/tokio-rs/tokio/pull/6641
80 [#6645]: https://github.com/tokio-rs/tokio/pull/6645
81 [#6660]: https://github.com/tokio-rs/tokio/pull/6660
82 [#6661]: https://github.com/tokio-rs/tokio/pull/6661
83 [#6663]: https://github.com/tokio-rs/tokio/pull/6663
84 [#6666]: https://github.com/tokio-rs/tokio/pull/6666
85 [#6667]: https://github.com/tokio-rs/tokio/pull/6667
86 [#6668]: https://github.com/tokio-rs/tokio/pull/6668
87 [#6671]: https://github.com/tokio-rs/tokio/pull/6671
88 [#6674]: https://github.com/tokio-rs/tokio/pull/6674
89 [#6692]: https://github.com/tokio-rs/tokio/pull/6692
90 [#6695]: https://github.com/tokio-rs/tokio/pull/6695
91 [#6696]: https://github.com/tokio-rs/tokio/pull/6696
92 [#6709]: https://github.com/tokio-rs/tokio/pull/6709
93 [#6710]: https://github.com/tokio-rs/tokio/pull/6710
94
95 # 1.38.1 (July 16th, 2024)
96
97 This release fixes the bug identified as ([#6682]), which caused timers not
98 to fire when they should.
99
100 ### Fixed
101
102 - time: update `wake_up` while holding all the locks of sharded time wheels ([#6683])
103
104 [#6682]: https://github.com/tokio-rs/tokio/pull/6682
105 [#6683]: https://github.com/tokio-rs/tokio/pull/6683
106
107 # 1.38.0 (May 30th, 2024)
108
109 This release marks the beginning of stabilization for runtime metrics. It
110 stabilizes `RuntimeMetrics::worker_count`. Future releases will continue to
111 stabilize more metrics.
112
113 ### Added
114
115 - fs: add `File::create_new` ([#6573])
116 - io: add `copy_bidirectional_with_sizes` ([#6500])
117 - io: implement `AsyncBufRead` for `Join` ([#6449])
118 - net: add Apple visionOS support ([#6465])
119 - net: implement `Clone` for `NamedPipeInfo` ([#6586])
120 - net: support QNX OS ([#6421])
121 - sync: add `Notify::notify_last` ([#6520])
122 - sync: add `mpsc::Receiver::{capacity,max_capacity}` ([#6511])
123 - sync: add `split` method to the semaphore permit ([#6472], [#6478])
124 - task: add `tokio::task::join_set::Builder::spawn_blocking` ([#6578])
125 - wasm: support rt-multi-thread with wasm32-wasi-preview1-threads ([#6510])
126
127 ### Changed
128
129 - macros: make `#[tokio::test]` append `#[test]` at the end of the attribute list ([#6497])
130 - metrics: fix `blocking_threads` count ([#6551])
131 - metrics: stabilize `RuntimeMetrics::worker_count` ([#6556])
132 - runtime: move task out of the `lifo_slot` in `block_in_place` ([#6596])
133 - runtime: panic if `global_queue_interval` is zero ([#6445])
134 - sync: always drop message in destructor for oneshot receiver ([#6558])
135 - sync: instrument `Semaphore` for task dumps ([#6499])
136 - sync: use FIFO ordering when waking batches of wakers ([#6521])
137 - task: make `LocalKey::get` work with Clone types ([#6433])
138 - tests: update nix and mio-aio dev-dependencies ([#6552])
139 - time: clean up implementation ([#6517])
140 - time: lazily init timers on first poll ([#6512])
141 - time: remove the `true_when` field in `TimerShared` ([#6563])
142 - time: use sharding for timer implementation ([#6534])
143
144 ### Fixed
145
146 - taskdump: allow building taskdump docs on non-unix machines ([#6564])
147 - time: check for overflow in `Interval::poll_tick` ([#6487])
148 - sync: fix incorrect `is_empty` on mpsc block boundaries ([#6603])
149
150 ### Documented
151
152 - fs: rewrite file system docs ([#6467])
153 - io: fix `stdin` documentation ([#6581])
154 - io: fix obsolete reference in `ReadHalf::unsplit()` documentation ([#6498])
155 - macros: render more comprehensible documentation for `select!` ([#6468])
156 - net: add missing types to module docs ([#6482])
157 - net: fix misleading `NamedPipeServer` example ([#6590])
158 - sync: add examples for `SemaphorePermit`, `OwnedSemaphorePermit` ([#6477])
159 - sync: document that `Barrier::wait` is not cancel safe ([#6494])
160 - sync: explain relation between `watch::Sender::{subscribe,closed}` ([#6490])
161 - task: clarify that you can't abort `spawn_blocking` tasks ([#6571])
162 - task: fix a typo in doc of `LocalSet::run_until` ([#6599])
163 - time: fix test-util requirement for pause and resume in docs ([#6503])
164
165 [#6421]: https://github.com/tokio-rs/tokio/pull/6421
166 [#6433]: https://github.com/tokio-rs/tokio/pull/6433
167 [#6445]: https://github.com/tokio-rs/tokio/pull/6445
168 [#6449]: https://github.com/tokio-rs/tokio/pull/6449
169 [#6465]: https://github.com/tokio-rs/tokio/pull/6465
170 [#6467]: https://github.com/tokio-rs/tokio/pull/6467
171 [#6468]: https://github.com/tokio-rs/tokio/pull/6468
172 [#6472]: https://github.com/tokio-rs/tokio/pull/6472
173 [#6477]: https://github.com/tokio-rs/tokio/pull/6477
174 [#6478]: https://github.com/tokio-rs/tokio/pull/6478
175 [#6482]: https://github.com/tokio-rs/tokio/pull/6482
176 [#6487]: https://github.com/tokio-rs/tokio/pull/6487
177 [#6490]: https://github.com/tokio-rs/tokio/pull/6490
178 [#6494]: https://github.com/tokio-rs/tokio/pull/6494
179 [#6497]: https://github.com/tokio-rs/tokio/pull/6497
180 [#6498]: https://github.com/tokio-rs/tokio/pull/6498
181 [#6499]: https://github.com/tokio-rs/tokio/pull/6499
182 [#6500]: https://github.com/tokio-rs/tokio/pull/6500
183 [#6503]: https://github.com/tokio-rs/tokio/pull/6503
184 [#6510]: https://github.com/tokio-rs/tokio/pull/6510
185 [#6511]: https://github.com/tokio-rs/tokio/pull/6511
186 [#6512]: https://github.com/tokio-rs/tokio/pull/6512
187 [#6517]: https://github.com/tokio-rs/tokio/pull/6517
188 [#6520]: https://github.com/tokio-rs/tokio/pull/6520
189 [#6521]: https://github.com/tokio-rs/tokio/pull/6521
190 [#6534]: https://github.com/tokio-rs/tokio/pull/6534
191 [#6551]: https://github.com/tokio-rs/tokio/pull/6551
192 [#6552]: https://github.com/tokio-rs/tokio/pull/6552
193 [#6556]: https://github.com/tokio-rs/tokio/pull/6556
194 [#6558]: https://github.com/tokio-rs/tokio/pull/6558
195 [#6563]: https://github.com/tokio-rs/tokio/pull/6563
196 [#6564]: https://github.com/tokio-rs/tokio/pull/6564
197 [#6571]: https://github.com/tokio-rs/tokio/pull/6571
198 [#6573]: https://github.com/tokio-rs/tokio/pull/6573
199 [#6578]: https://github.com/tokio-rs/tokio/pull/6578
200 [#6581]: https://github.com/tokio-rs/tokio/pull/6581
201 [#6586]: https://github.com/tokio-rs/tokio/pull/6586
202 [#6590]: https://github.com/tokio-rs/tokio/pull/6590
203 [#6596]: https://github.com/tokio-rs/tokio/pull/6596
204 [#6599]: https://github.com/tokio-rs/tokio/pull/6599
205 [#6603]: https://github.com/tokio-rs/tokio/pull/6603
206
207 # 1.37.0 (March 28th, 2024)
208
209 ### Added
210
211 - fs: add `set_max_buf_size` to `tokio::fs::File` ([#6411])
212 - io: add `try_new` and `try_with_interest` to `AsyncFd` ([#6345])
213 - sync: add `forget_permits` method to semaphore ([#6331])
214 - sync: add `is_closed`, `is_empty`, and `len` to mpsc receivers ([#6348])
215 - sync: add a `rwlock()` method to owned `RwLock` guards ([#6418])
216 - sync: expose strong and weak counts of mpsc sender handles ([#6405])
217 - sync: implement `Clone` for `watch::Sender` ([#6388])
218 - task: add `TaskLocalFuture::take_value` ([#6340])
219 - task: implement `FromIterator` for `JoinSet` ([#6300])
220
221 ### Changed
222
223 - io: make `io::split` use a mutex instead of a spinlock ([#6403])
224
225 ### Fixed
226
227 - docs: fix docsrs build without net feature ([#6360])
228 - macros: allow select with only else branch ([#6339])
229 - runtime: fix leaking registration entries when os registration fails ([#6329])
230
231 ### Documented
232
233 - io: document cancel safety of `AsyncBufReadExt::fill_buf` ([#6431])
234 - io: document cancel safety of `AsyncReadExt`'s primitive read functions ([#6337])
235 - runtime: add doc link from `Runtime` to `#[tokio::main]` ([#6366])
236 - runtime: make the `enter` example deterministic ([#6351])
237 - sync: add Semaphore example for limiting the number of outgoing requests ([#6419])
238 - sync: fix missing period in broadcast docs ([#6377])
239 - sync: mark `mpsc::Sender::downgrade` with `#[must_use]` ([#6326])
240 - sync: reorder `const_new` before `new_with` ([#6392])
241 - sync: update watch channel docs ([#6395])
242 - task: fix documentation links ([#6336])
243
244 ### Changed (unstable)
245
246 - runtime: include task `Id` in taskdumps ([#6328])
247 - runtime: panic if `unhandled_panic` is enabled when not supported ([#6410])
248
249 [#6300]: https://github.com/tokio-rs/tokio/pull/6300
250 [#6326]: https://github.com/tokio-rs/tokio/pull/6326
251 [#6328]: https://github.com/tokio-rs/tokio/pull/6328
252 [#6329]: https://github.com/tokio-rs/tokio/pull/6329
253 [#6331]: https://github.com/tokio-rs/tokio/pull/6331
254 [#6336]: https://github.com/tokio-rs/tokio/pull/6336
255 [#6337]: https://github.com/tokio-rs/tokio/pull/6337
256 [#6339]: https://github.com/tokio-rs/tokio/pull/6339
257 [#6340]: https://github.com/tokio-rs/tokio/pull/6340
258 [#6345]: https://github.com/tokio-rs/tokio/pull/6345
259 [#6348]: https://github.com/tokio-rs/tokio/pull/6348
260 [#6351]: https://github.com/tokio-rs/tokio/pull/6351
261 [#6360]: https://github.com/tokio-rs/tokio/pull/6360
262 [#6366]: https://github.com/tokio-rs/tokio/pull/6366
263 [#6377]: https://github.com/tokio-rs/tokio/pull/6377
264 [#6388]: https://github.com/tokio-rs/tokio/pull/6388
265 [#6392]: https://github.com/tokio-rs/tokio/pull/6392
266 [#6395]: https://github.com/tokio-rs/tokio/pull/6395
267 [#6403]: https://github.com/tokio-rs/tokio/pull/6403
268 [#6405]: https://github.com/tokio-rs/tokio/pull/6405
269 [#6410]: https://github.com/tokio-rs/tokio/pull/6410
270 [#6411]: https://github.com/tokio-rs/tokio/pull/6411
271 [#6418]: https://github.com/tokio-rs/tokio/pull/6418
272 [#6419]: https://github.com/tokio-rs/tokio/pull/6419
273 [#6431]: https://github.com/tokio-rs/tokio/pull/6431
274
275 # 1.36.0 (February 2nd, 2024)
276
277 ### Added
278
279 - io: add `tokio::io::Join` ([#6220])
280 - io: implement `AsyncWrite` for `Empty` ([#6235])
281 - net: add support for anonymous unix pipes ([#6127])
282 - net: add `UnixSocket` ([#6290])
283 - net: expose keepalive option on `TcpSocket` ([#6311])
284 - sync: add `{Receiver,UnboundedReceiver}::poll_recv_many` ([#6236])
285 - sync: add `Sender::{try_,}reserve_many` ([#6205])
286 - sync: add `watch::Receiver::mark_unchanged` ([#6252])
287 - task: add `JoinSet::try_join_next` ([#6280])
288
289 ### Changed
290
291 - io: make `copy` cooperative ([#6265])
292 - io: make `repeat` and `sink` cooperative ([#6254])
293 - io: simplify check for empty slice ([#6293])
294 - process: use pidfd on Linux when available ([#6152])
295 - sync: use AtomicBool in broadcast channel future ([#6298])
296
297 ### Documented
298
299 - io: clarify `clear_ready` docs ([#6304])
300 - net: document that `*Fd` traits on `TcpSocket` are unix-only ([#6294])
301 - sync: document FIFO behavior of `tokio::sync::Mutex` ([#6279])
302 - chore: typographic improvements ([#6262])
303 - runtime: remove obsolete comment ([#6303])
304 - task: fix typo ([#6261])
305
306 [#6220]: https://github.com/tokio-rs/tokio/pull/6220
307 [#6235]: https://github.com/tokio-rs/tokio/pull/6235
308 [#6127]: https://github.com/tokio-rs/tokio/pull/6127
309 [#6290]: https://github.com/tokio-rs/tokio/pull/6290
310 [#6311]: https://github.com/tokio-rs/tokio/pull/6311
311 [#6236]: https://github.com/tokio-rs/tokio/pull/6236
312 [#6205]: https://github.com/tokio-rs/tokio/pull/6205
313 [#6252]: https://github.com/tokio-rs/tokio/pull/6252
314 [#6280]: https://github.com/tokio-rs/tokio/pull/6280
315 [#6265]: https://github.com/tokio-rs/tokio/pull/6265
316 [#6254]: https://github.com/tokio-rs/tokio/pull/6254
317 [#6293]: https://github.com/tokio-rs/tokio/pull/6293
318 [#6238]: https://github.com/tokio-rs/tokio/pull/6238
319 [#6152]: https://github.com/tokio-rs/tokio/pull/6152
320 [#6298]: https://github.com/tokio-rs/tokio/pull/6298
321 [#6262]: https://github.com/tokio-rs/tokio/pull/6262
322 [#6303]: https://github.com/tokio-rs/tokio/pull/6303
323 [#6261]: https://github.com/tokio-rs/tokio/pull/6261
324 [#6304]: https://github.com/tokio-rs/tokio/pull/6304
325 [#6294]: https://github.com/tokio-rs/tokio/pull/6294
326 [#6279]: https://github.com/tokio-rs/tokio/pull/6279
327
328 # 1.35.1 (December 19, 2023)
329
330 This is a forward part of a change that was backported to 1.25.3.
331
332 ### Fixed
333
334 - io: add budgeting to `tokio::runtime::io::registration::async_io` ([#6221])
335
336 [#6221]: https://github.com/tokio-rs/tokio/pull/6221
337
338 # 1.35.0 (December 8th, 2023)
339
340 ### Added
341
342 - net: add Apple watchOS support ([#6176])
343
344 ### Changed
345
346 - io: drop the `Sized` requirements from `AsyncReadExt.read_buf` ([#6169])
347 - runtime: make `Runtime` unwind safe ([#6189])
348 - runtime: reduce the lock contention in task spawn ([#6001])
349 - tokio: update nix dependency to 0.27.1 ([#6190])
350
351 ### Fixed
352
353 - chore: make `--cfg docsrs` work without net feature ([#6166])
354 - chore: use relaxed load for `unsync_load` on miri ([#6179])
355 - runtime: handle missing context on wake ([#6148])
356 - taskdump: fix taskdump cargo config example ([#6150])
357 - taskdump: skip notified tasks during taskdumps ([#6194])
358 - tracing: avoid creating resource spans with current parent, use a None parent instead ([#6107])
359 - tracing: make task span explicit root ([#6158])
360
361 ### Documented
362
363 - io: flush in `AsyncWriteExt` examples ([#6149])
364 - runtime: document fairness guarantees and current behavior ([#6145])
365 - task: document cancel safety of `LocalSet::run_until` ([#6147])
366
367 [#6001]: https://github.com/tokio-rs/tokio/pull/6001
368 [#6107]: https://github.com/tokio-rs/tokio/pull/6107
369 [#6144]: https://github.com/tokio-rs/tokio/pull/6144
370 [#6145]: https://github.com/tokio-rs/tokio/pull/6145
371 [#6147]: https://github.com/tokio-rs/tokio/pull/6147
372 [#6148]: https://github.com/tokio-rs/tokio/pull/6148
373 [#6149]: https://github.com/tokio-rs/tokio/pull/6149
374 [#6150]: https://github.com/tokio-rs/tokio/pull/6150
375 [#6158]: https://github.com/tokio-rs/tokio/pull/6158
376 [#6166]: https://github.com/tokio-rs/tokio/pull/6166
377 [#6169]: https://github.com/tokio-rs/tokio/pull/6169
378 [#6176]: https://github.com/tokio-rs/tokio/pull/6176
379 [#6179]: https://github.com/tokio-rs/tokio/pull/6179
380 [#6189]: https://github.com/tokio-rs/tokio/pull/6189
381 [#6190]: https://github.com/tokio-rs/tokio/pull/6190
382 [#6194]: https://github.com/tokio-rs/tokio/pull/6194
383
384 # 1.34.0 (November 19th, 2023)
385
386 ### Fixed
387
388 - io: allow `clear_readiness` after io driver shutdown ([#6067])
389 - io: fix integer overflow in `take` ([#6080])
390 - io: fix I/O resource hang ([#6134])
391 - sync: fix `broadcast::channel` link ([#6100])
392
393 ### Changed
394
395 - macros: use `::core` qualified imports instead of `::std` inside `tokio::test` macro ([#5973])
396
397 ### Added
398
399 - fs: update cfg attr in `fs::read_dir` to include `aix` ([#6075])
400 - sync: add `mpsc::Receiver::recv_many` ([#6010])
401 - tokio: added vita target support ([#6094])
402
403 [#5973]: https://github.com/tokio-rs/tokio/pull/5973
404 [#6067]: https://github.com/tokio-rs/tokio/pull/6067
405 [#6080]: https://github.com/tokio-rs/tokio/pull/6080
406 [#6134]: https://github.com/tokio-rs/tokio/pull/6134
407 [#6100]: https://github.com/tokio-rs/tokio/pull/6100
408 [#6075]: https://github.com/tokio-rs/tokio/pull/6075
409 [#6010]: https://github.com/tokio-rs/tokio/pull/6010
410 [#6094]: https://github.com/tokio-rs/tokio/pull/6094
411
412 # 1.33.0 (October 9, 2023)
413
414 ### Fixed
415
416 - io: mark `Interest::add` with `#[must_use]` ([#6037])
417 - runtime: fix cache line size for RISC-V ([#5994])
418 - sync: prevent lock poisoning in `watch::Receiver::wait_for` ([#6021])
419 - task: fix `spawn_local` source location ([#5984])
420
421 ### Changed
422
423 - sync: use Acquire/Release orderings instead of SeqCst in `watch` ([#6018])
424
425 ### Added
426
427 - fs: add vectored writes to `tokio::fs::File` ([#5958])
428 - io: add `Interest::remove` method ([#5906])
429 - io: add vectored writes to `DuplexStream` ([#5985])
430 - net: add Apple tvOS support ([#6045])
431 - sync: add `?Sized` bound to `{MutexGuard,OwnedMutexGuard}::map` ([#5997])
432 - sync: add `watch::Receiver::mark_unseen` ([#5962], [#6014], [#6017])
433 - sync: add `watch::Sender::new` ([#5998])
434 - sync: add const fn `OnceCell::from_value` ([#5903])
435
436 ### Removed
437
438 - remove unused `stats` feature ([#5952])
439
440 ### Documented
441
442 - add missing backticks in code examples ([#5938], [#6056])
443 - fix typos ([#5988], [#6030])
444 - process: document that `Child::wait` is cancel safe ([#5977])
445 - sync: add examples for `Semaphore` ([#5939], [#5956], [#5978], [#6031], [#6032], [#6050])
446 - sync: document that `broadcast` capacity is a lower bound ([#6042])
447 - sync: document that `const_new` is not instrumented ([#6002])
448 - sync: improve cancel-safety documentation for `mpsc::Sender::send` ([#5947])
449 - sync: improve docs for `watch` channel ([#5954])
450 - taskdump: render taskdump documentation on docs.rs ([#5972])
451
452 ### Unstable
453
454 - taskdump: fix potential deadlock ([#6036])
455
456 [#5903]: https://github.com/tokio-rs/tokio/pull/5903
457 [#5906]: https://github.com/tokio-rs/tokio/pull/5906
458 [#5938]: https://github.com/tokio-rs/tokio/pull/5938
459 [#5939]: https://github.com/tokio-rs/tokio/pull/5939
460 [#5947]: https://github.com/tokio-rs/tokio/pull/5947
461 [#5952]: https://github.com/tokio-rs/tokio/pull/5952
462 [#5954]: https://github.com/tokio-rs/tokio/pull/5954
463 [#5956]: https://github.com/tokio-rs/tokio/pull/5956
464 [#5958]: https://github.com/tokio-rs/tokio/pull/5958
465 [#5960]: https://github.com/tokio-rs/tokio/pull/5960
466 [#5962]: https://github.com/tokio-rs/tokio/pull/5962
467 [#5971]: https://github.com/tokio-rs/tokio/pull/5971
468 [#5972]: https://github.com/tokio-rs/tokio/pull/5972
469 [#5977]: https://github.com/tokio-rs/tokio/pull/5977
470 [#5978]: https://github.com/tokio-rs/tokio/pull/5978
471 [#5984]: https://github.com/tokio-rs/tokio/pull/5984
472 [#5985]: https://github.com/tokio-rs/tokio/pull/5985
473 [#5988]: https://github.com/tokio-rs/tokio/pull/5988
474 [#5994]: https://github.com/tokio-rs/tokio/pull/5994
475 [#5997]: https://github.com/tokio-rs/tokio/pull/5997
476 [#5998]: https://github.com/tokio-rs/tokio/pull/5998
477 [#6002]: https://github.com/tokio-rs/tokio/pull/6002
478 [#6014]: https://github.com/tokio-rs/tokio/pull/6014
479 [#6017]: https://github.com/tokio-rs/tokio/pull/6017
480 [#6018]: https://github.com/tokio-rs/tokio/pull/6018
481 [#6021]: https://github.com/tokio-rs/tokio/pull/6021
482 [#6030]: https://github.com/tokio-rs/tokio/pull/6030
483 [#6031]: https://github.com/tokio-rs/tokio/pull/6031
484 [#6032]: https://github.com/tokio-rs/tokio/pull/6032
485 [#6036]: https://github.com/tokio-rs/tokio/pull/6036
486 [#6037]: https://github.com/tokio-rs/tokio/pull/6037
487 [#6042]: https://github.com/tokio-rs/tokio/pull/6042
488 [#6045]: https://github.com/tokio-rs/tokio/pull/6045
489 [#6050]: https://github.com/tokio-rs/tokio/pull/6050
490 [#6056]: https://github.com/tokio-rs/tokio/pull/6056
491 [#6058]: https://github.com/tokio-rs/tokio/pull/6058
492
493 # 1.32.1 (December 19, 2023)
494
495 This is a forward part of a change that was backported to 1.25.3.
496
497 ### Fixed
498
499 - io: add budgeting to `tokio::runtime::io::registration::async_io` ([#6221])
500
501 [#6221]: https://github.com/tokio-rs/tokio/pull/6221
502
503 # 1.32.0 (August 16, 2023)
504
505 ### Fixed
506
507 - sync: fix potential quadratic behavior in `broadcast::Receiver` ([#5925])
508
509 ### Added
510
511 - process: stabilize `Command::raw_arg` ([#5930])
512 - io: enable awaiting error readiness ([#5781])
513
514 ### Unstable
515
516 - rt(alt): improve scalability of alt runtime as the number of cores grows ([#5935])
517
518 [#5925]: https://github.com/tokio-rs/tokio/pull/5925
519 [#5930]: https://github.com/tokio-rs/tokio/pull/5930
520 [#5781]: https://github.com/tokio-rs/tokio/pull/5781
521 [#5935]: https://github.com/tokio-rs/tokio/pull/5935
522
523 # 1.31.0 (August 10, 2023)
524
525 ### Fixed
526
527 * io: delegate `WriteHalf::poll_write_vectored` ([#5914])
528
529 ### Unstable
530
531 * rt(alt): fix memory leak in unstable next-gen scheduler prototype ([#5911])
532 * rt: expose mean task poll time metric ([#5927])
533
534 [#5914]: https://github.com/tokio-rs/tokio/pull/5914
535 [#5911]: https://github.com/tokio-rs/tokio/pull/5911
536 [#5927]: https://github.com/tokio-rs/tokio/pull/5927
537
538 # 1.30.0 (August 9, 2023)
539
540 This release bumps the MSRV of Tokio to 1.63. ([#5887])
541
542 ### Changed
543
544 - tokio: reduce LLVM code generation ([#5859])
545 - io: support `--cfg mio_unsupported_force_poll_poll` flag ([#5881])
546 - sync: make `const_new` methods always available ([#5885])
547 - sync: avoid false sharing in mpsc channel ([#5829])
548 - rt: pop at least one task from inject queue ([#5908])
549
550 ### Added
551
552 - sync: add `broadcast::Sender::new` ([#5824])
553 - net: implement `UCred` for espidf ([#5868])
554 - fs: add `File::options()` ([#5869])
555 - time: implement extra reset variants for `Interval` ([#5878])
556 - process: add `{ChildStd*}::into_owned_{fd, handle}` ([#5899])
557
558 ### Removed
559
560 - tokio: removed unused `tokio_*` cfgs ([#5890])
561 - remove build script to speed up compilation ([#5887])
562
563 ### Documented
564
565 - sync: mention lagging in docs for `broadcast::send` ([#5820])
566 - runtime: expand on sharing runtime docs ([#5858])
567 - io: use vec in example for `AsyncReadExt::read_exact` ([#5863])
568 - time: mark `Sleep` as `!Unpin` in docs ([#5916])
569 - process: fix `raw_arg` not showing up in docs ([#5865])
570
571 ### Unstable
572
573 - rt: add runtime ID ([#5864])
574 - rt: initial implementation of new threaded runtime ([#5823])
575
576 [#5820]: https://github.com/tokio-rs/tokio/pull/5820
577 [#5823]: https://github.com/tokio-rs/tokio/pull/5823
578 [#5824]: https://github.com/tokio-rs/tokio/pull/5824
579 [#5829]: https://github.com/tokio-rs/tokio/pull/5829
580 [#5858]: https://github.com/tokio-rs/tokio/pull/5858
581 [#5859]: https://github.com/tokio-rs/tokio/pull/5859
582 [#5863]: https://github.com/tokio-rs/tokio/pull/5863
583 [#5864]: https://github.com/tokio-rs/tokio/pull/5864
584 [#5865]: https://github.com/tokio-rs/tokio/pull/5865
585 [#5868]: https://github.com/tokio-rs/tokio/pull/5868
586 [#5869]: https://github.com/tokio-rs/tokio/pull/5869
587 [#5878]: https://github.com/tokio-rs/tokio/pull/5878
588 [#5881]: https://github.com/tokio-rs/tokio/pull/5881
589 [#5885]: https://github.com/tokio-rs/tokio/pull/5885
590 [#5887]: https://github.com/tokio-rs/tokio/pull/5887
591 [#5890]: https://github.com/tokio-rs/tokio/pull/5890
592 [#5899]: https://github.com/tokio-rs/tokio/pull/5899
593 [#5908]: https://github.com/tokio-rs/tokio/pull/5908
594 [#5916]: https://github.com/tokio-rs/tokio/pull/5916
595
596 # 1.29.1 (June 29, 2023)
597
598 ### Fixed
599
600 - rt: fix nesting two `block_in_place` with a `block_on` between ([#5837])
601
602 [#5837]: https://github.com/tokio-rs/tokio/pull/5837
603
604 # 1.29.0 (June 27, 2023)
605
606 Technically a breaking change, the `Send` implementation is removed from
607 `runtime::EnterGuard`. This change fixes a bug and should not impact most users.
608
609 ### Breaking
610
611 - rt: `EnterGuard` should not be `Send` ([#5766])
612
613 ### Fixed
614
615 - fs: reduce blocking ops in `fs::read_dir` ([#5653])
616 - rt: fix possible starvation ([#5686], [#5712])
617 - rt: fix stacked borrows issue in `JoinSet` ([#5693])
618 - rt: panic if `EnterGuard` dropped incorrect order ([#5772])
619 - time: do not overflow to signal value ([#5710])
620 - fs: wait for in-flight ops before cloning `File` ([#5803])
621
622 ### Changed
623
624 - rt: reduce time to poll tasks scheduled from outside the runtime ([#5705], [#5720])
625
626 ### Added
627
628 - net: add uds doc alias for unix sockets ([#5659])
629 - rt: add metric for number of tasks ([#5628])
630 - sync: implement more traits for channel errors ([#5666])
631 - net: add nodelay methods on TcpSocket ([#5672])
632 - sync: add `broadcast::Receiver::blocking_recv` ([#5690])
633 - process: add `raw_arg` method to `Command` ([#5704])
634 - io: support PRIORITY epoll events ([#5566])
635 - task: add `JoinSet::poll_join_next` ([#5721])
636 - net: add support for Redox OS ([#5790])
637
638
639 ### Unstable
640
641 - rt: add the ability to dump task backtraces ([#5608], [#5676], [#5708], [#5717])
642 - rt: instrument task poll times with a histogram ([#5685])
643
644 [#5766]: https://github.com/tokio-rs/tokio/pull/5766
645 [#5653]: https://github.com/tokio-rs/tokio/pull/5653
646 [#5686]: https://github.com/tokio-rs/tokio/pull/5686
647 [#5712]: https://github.com/tokio-rs/tokio/pull/5712
648 [#5693]: https://github.com/tokio-rs/tokio/pull/5693
649 [#5772]: https://github.com/tokio-rs/tokio/pull/5772
650 [#5710]: https://github.com/tokio-rs/tokio/pull/5710
651 [#5803]: https://github.com/tokio-rs/tokio/pull/5803
652 [#5705]: https://github.com/tokio-rs/tokio/pull/5705
653 [#5720]: https://github.com/tokio-rs/tokio/pull/5720
654 [#5659]: https://github.com/tokio-rs/tokio/pull/5659
655 [#5628]: https://github.com/tokio-rs/tokio/pull/5628
656 [#5666]: https://github.com/tokio-rs/tokio/pull/5666
657 [#5672]: https://github.com/tokio-rs/tokio/pull/5672
658 [#5690]: https://github.com/tokio-rs/tokio/pull/5690
659 [#5704]: https://github.com/tokio-rs/tokio/pull/5704
660 [#5566]: https://github.com/tokio-rs/tokio/pull/5566
661 [#5721]: https://github.com/tokio-rs/tokio/pull/5721
662 [#5790]: https://github.com/tokio-rs/tokio/pull/5790
663 [#5608]: https://github.com/tokio-rs/tokio/pull/5608
664 [#5676]: https://github.com/tokio-rs/tokio/pull/5676
665 [#5708]: https://github.com/tokio-rs/tokio/pull/5708
666 [#5717]: https://github.com/tokio-rs/tokio/pull/5717
667 [#5685]: https://github.com/tokio-rs/tokio/pull/5685
668
669 # 1.28.2 (May 28, 2023)
670
671 Forward ports 1.18.6 changes.
672
673 ### Fixed
674
675 - deps: disable default features for mio ([#5728])
676
677 [#5728]: https://github.com/tokio-rs/tokio/pull/5728
678
679 # 1.28.1 (May 10th, 2023)
680
681 This release fixes a mistake in the build script that makes `AsFd`
682 implementations unavailable on Rust 1.63. ([#5677])
683
684 [#5677]: https://github.com/tokio-rs/tokio/pull/5677
685
686 # 1.28.0 (April 25th, 2023)
687
688 ### Added
689
690 - io: add `AsyncFd::async_io` ([#5542])
691 - io: impl BufMut for ReadBuf ([#5590])
692 - net: add `recv_buf` for `UdpSocket` and `UnixDatagram` ([#5583])
693 - sync: add `OwnedSemaphorePermit::semaphore` ([#5618])
694 - sync: add `same_channel` to broadcast channel ([#5607])
695 - sync: add `watch::Receiver::wait_for` ([#5611])
696 - task: add `JoinSet::spawn_blocking` and `JoinSet::spawn_blocking_on` ([#5612])
697
698 ### Changed
699
700 - deps: update windows-sys to 0.48 ([#5591])
701 - io: make `read_to_end` not grow unnecessarily ([#5610])
702 - macros: make entrypoints more efficient ([#5621])
703 - sync: improve Debug impl for `RwLock` ([#5647])
704 - sync: reduce contention in `Notify` ([#5503])
705
706 ### Fixed
707
708 - net: support `get_peer_cred` on AIX ([#5065])
709 - sync: avoid deadlocks in `broadcast` with custom wakers ([#5578])
710
711 ### Documented
712
713 - sync: fix typo in `Semaphore::MAX_PERMITS` ([#5645])
714 - sync: fix typo in `tokio::sync::watch::Sender` docs ([#5587])
715
716 [#5065]: https://github.com/tokio-rs/tokio/pull/5065
717 [#5503]: https://github.com/tokio-rs/tokio/pull/5503
718 [#5542]: https://github.com/tokio-rs/tokio/pull/5542
719 [#5578]: https://github.com/tokio-rs/tokio/pull/5578
720 [#5583]: https://github.com/tokio-rs/tokio/pull/5583
721 [#5587]: https://github.com/tokio-rs/tokio/pull/5587
722 [#5590]: https://github.com/tokio-rs/tokio/pull/5590
723 [#5591]: https://github.com/tokio-rs/tokio/pull/5591
724 [#5607]: https://github.com/tokio-rs/tokio/pull/5607
725 [#5610]: https://github.com/tokio-rs/tokio/pull/5610
726 [#5611]: https://github.com/tokio-rs/tokio/pull/5611
727 [#5612]: https://github.com/tokio-rs/tokio/pull/5612
728 [#5618]: https://github.com/tokio-rs/tokio/pull/5618
729 [#5621]: https://github.com/tokio-rs/tokio/pull/5621
730 [#5645]: https://github.com/tokio-rs/tokio/pull/5645
731 [#5647]: https://github.com/tokio-rs/tokio/pull/5647
732
733 # 1.27.0 (March 27th, 2023)
734
735 This release bumps the MSRV of Tokio to 1.56. ([#5559])
736
737 ### Added
738
739 - io: add `async_io` helper method to sockets ([#5512])
740 - io: add implementations of `AsFd`/`AsHandle`/`AsSocket` ([#5514], [#5540])
741 - net: add `UdpSocket::peek_sender()` ([#5520])
742 - sync: add `RwLockWriteGuard::{downgrade_map, try_downgrade_map}` ([#5527])
743 - task: add `JoinHandle::abort_handle` ([#5543])
744
745 ### Changed
746
747 - io: use `memchr` from `libc` ([#5558])
748 - macros: accept path as crate rename in `#[tokio::main]` ([#5557])
749 - macros: update to syn 2.0.0 ([#5572])
750 - time: don't register for a wakeup when `Interval` returns `Ready` ([#5553])
751
752 ### Fixed
753
754 - fs: fuse std iterator in `ReadDir` ([#5555])
755 - tracing: fix `spawn_blocking` location fields ([#5573])
756 - time: clean up redundant check in `Wheel::poll()` ([#5574])
757
758 ### Documented
759
760 - macros: define cancellation safety ([#5525])
761 - io: add details to docs of `tokio::io::copy[_buf]` ([#5575])
762 - io: refer to `ReaderStream` and `StreamReader` in module docs ([#5576])
763
764 [#5512]: https://github.com/tokio-rs/tokio/pull/5512
765 [#5514]: https://github.com/tokio-rs/tokio/pull/5514
766 [#5520]: https://github.com/tokio-rs/tokio/pull/5520
767 [#5525]: https://github.com/tokio-rs/tokio/pull/5525
768 [#5527]: https://github.com/tokio-rs/tokio/pull/5527
769 [#5540]: https://github.com/tokio-rs/tokio/pull/5540
770 [#5543]: https://github.com/tokio-rs/tokio/pull/5543
771 [#5553]: https://github.com/tokio-rs/tokio/pull/5553
772 [#5555]: https://github.com/tokio-rs/tokio/pull/5555
773 [#5557]: https://github.com/tokio-rs/tokio/pull/5557
774 [#5558]: https://github.com/tokio-rs/tokio/pull/5558
775 [#5559]: https://github.com/tokio-rs/tokio/pull/5559
776 [#5572]: https://github.com/tokio-rs/tokio/pull/5572
777 [#5573]: https://github.com/tokio-rs/tokio/pull/5573
778 [#5574]: https://github.com/tokio-rs/tokio/pull/5574
779 [#5575]: https://github.com/tokio-rs/tokio/pull/5575
780 [#5576]: https://github.com/tokio-rs/tokio/pull/5576
781
782 # 1.26.0 (March 1st, 2023)
783
784 ### Fixed
785
786 - macros: fix empty `join!` and `try_join!` ([#5504])
787 - sync: don't leak tracing spans in mutex guards ([#5469])
788 - sync: drop wakers after unlocking the mutex in Notify ([#5471])
789 - sync: drop wakers outside lock in semaphore ([#5475])
790
791 ### Added
792
793 - fs: add `fs::try_exists` ([#4299])
794 - net: add types for named unix pipes ([#5351])
795 - sync: add `MappedOwnedMutexGuard` ([#5474])
796
797 ### Changed
798
799 - chore: update windows-sys to 0.45 ([#5386])
800 - net: use Message Read Mode for named pipes ([#5350])
801 - sync: mark lock guards with `#[clippy::has_significant_drop]` ([#5422])
802 - sync: reduce contention in watch channel ([#5464])
803 - time: remove cache padding in timer entries ([#5468])
804 - time: Improve `Instant::now()` perf with test-util ([#5513])
805
806 ### Internal Changes
807
808 - io: use `poll_fn` in `copy_bidirectional` ([#5486])
809 - net: refactor named pipe builders to not use bitfields ([#5477])
810 - rt: remove Arc from Clock ([#5434])
811 - sync: make `notify_waiters` calls atomic ([#5458])
812 - time: don't store deadline twice in sleep entries ([#5410])
813
814 ### Unstable
815
816 - metrics: add a new metric for budget exhaustion yields ([#5517])
817
818 ### Documented
819
820 - io: improve AsyncFd example ([#5481])
821 - runtime: document the nature of the main future ([#5494])
822 - runtime: remove extra period in docs ([#5511])
823 - signal: updated Documentation for Signals ([#5459])
824 - sync: add doc aliases for `blocking_*` methods ([#5448])
825 - sync: fix docs for Send/Sync bounds in broadcast ([#5480])
826 - sync: document drop behavior for channels ([#5497])
827 - task: clarify what happens to spawned work during runtime shutdown ([#5394])
828 - task: clarify `process::Command` docs ([#5413])
829 - task: fix wording with 'unsend' ([#5452])
830 - time: document immediate completion guarantee for timeouts ([#5509])
831 - tokio: document supported platforms ([#5483])
832
833 [#4299]: https://github.com/tokio-rs/tokio/pull/4299
834 [#5350]: https://github.com/tokio-rs/tokio/pull/5350
835 [#5351]: https://github.com/tokio-rs/tokio/pull/5351
836 [#5386]: https://github.com/tokio-rs/tokio/pull/5386
837 [#5394]: https://github.com/tokio-rs/tokio/pull/5394
838 [#5410]: https://github.com/tokio-rs/tokio/pull/5410
839 [#5413]: https://github.com/tokio-rs/tokio/pull/5413
840 [#5422]: https://github.com/tokio-rs/tokio/pull/5422
841 [#5434]: https://github.com/tokio-rs/tokio/pull/5434
842 [#5448]: https://github.com/tokio-rs/tokio/pull/5448
843 [#5452]: https://github.com/tokio-rs/tokio/pull/5452
844 [#5458]: https://github.com/tokio-rs/tokio/pull/5458
845 [#5459]: https://github.com/tokio-rs/tokio/pull/5459
846 [#5464]: https://github.com/tokio-rs/tokio/pull/5464
847 [#5468]: https://github.com/tokio-rs/tokio/pull/5468
848 [#5469]: https://github.com/tokio-rs/tokio/pull/5469
849 [#5471]: https://github.com/tokio-rs/tokio/pull/5471
850 [#5474]: https://github.com/tokio-rs/tokio/pull/5474
851 [#5475]: https://github.com/tokio-rs/tokio/pull/5475
852 [#5477]: https://github.com/tokio-rs/tokio/pull/5477
853 [#5480]: https://github.com/tokio-rs/tokio/pull/5480
854 [#5481]: https://github.com/tokio-rs/tokio/pull/5481
855 [#5483]: https://github.com/tokio-rs/tokio/pull/5483
856 [#5486]: https://github.com/tokio-rs/tokio/pull/5486
857 [#5494]: https://github.com/tokio-rs/tokio/pull/5494
858 [#5497]: https://github.com/tokio-rs/tokio/pull/5497
859 [#5504]: https://github.com/tokio-rs/tokio/pull/5504
860 [#5509]: https://github.com/tokio-rs/tokio/pull/5509
861 [#5511]: https://github.com/tokio-rs/tokio/pull/5511
862 [#5513]: https://github.com/tokio-rs/tokio/pull/5513
863 [#5517]: https://github.com/tokio-rs/tokio/pull/5517
864
865 # 1.25.3 (December 17th, 2023)
866
867 ### Fixed
868 - io: add budgeting to `tokio::runtime::io::registration::async_io` ([#6221])
869
870 [#6221]: https://github.com/tokio-rs/tokio/pull/6221
871
872 # 1.25.2 (September 22, 2023)
873
874 Forward ports 1.20.6 changes.
875
876 ### Changed
877
878 - io: use `memchr` from `libc` ([#5960])
879
880 [#5960]: https://github.com/tokio-rs/tokio/pull/5960
881
882 # 1.25.1 (May 28, 2023)
883
884 Forward ports 1.18.6 changes.
885
886 ### Fixed
887
888 - deps: disable default features for mio ([#5728])
889
890 [#5728]: https://github.com/tokio-rs/tokio/pull/5728
891
892 # 1.25.0 (January 28, 2023)
893
894 ### Fixed
895
896 - rt: fix runtime metrics reporting ([#5330])
897
898 ### Added
899
900 - sync: add `broadcast::Sender::len` ([#5343])
901
902 ### Changed
903
904 - fs: increase maximum read buffer size to 2MiB ([#5397])
905
906 [#5330]: https://github.com/tokio-rs/tokio/pull/5330
907 [#5343]: https://github.com/tokio-rs/tokio/pull/5343
908 [#5397]: https://github.com/tokio-rs/tokio/pull/5397
909
910 # 1.24.2 (January 17, 2023)
911
912 Forward ports 1.18.5 changes.
913
914 ### Fixed
915
916 - io: fix unsoundness in `ReadHalf::unsplit` ([#5375])
917
918 [#5375]: https://github.com/tokio-rs/tokio/pull/5375
919
920 # 1.24.1 (January 6, 2022)
921
922 This release fixes a compilation failure on targets without `AtomicU64` when using rustc older than 1.63. ([#5356])
923
924 [#5356]: https://github.com/tokio-rs/tokio/pull/5356
925
926 # 1.24.0 (January 5, 2022)
927
928 ### Fixed
929 - rt: improve native `AtomicU64` support detection ([#5284])
930
931 ### Added
932 - rt: add configuration option for max number of I/O events polled from the OS
933 per tick ([#5186])
934 - rt: add an environment variable for configuring the default number of worker
935 threads per runtime instance ([#4250])
936
937 ### Changed
938 - sync: reduce MPSC channel stack usage ([#5294])
939 - io: reduce lock contention in I/O operations ([#5300])
940 - fs: speed up `read_dir()` by chunking operations ([#5309])
941 - rt: use internal `ThreadId` implementation ([#5329])
942 - test: don't auto-advance time when a `spawn_blocking` task is running ([#5115])
943
944 [#5186]: https://github.com/tokio-rs/tokio/pull/5186
945 [#5294]: https://github.com/tokio-rs/tokio/pull/5294
946 [#5284]: https://github.com/tokio-rs/tokio/pull/5284
947 [#4250]: https://github.com/tokio-rs/tokio/pull/4250
948 [#5300]: https://github.com/tokio-rs/tokio/pull/5300
949 [#5329]: https://github.com/tokio-rs/tokio/pull/5329
950 [#5115]: https://github.com/tokio-rs/tokio/pull/5115
951 [#5309]: https://github.com/tokio-rs/tokio/pull/5309
952
953 # 1.23.1 (January 4, 2022)
954
955 This release forward ports changes from 1.18.4.
956
957 ### Fixed
958
959 - net: fix Windows named pipe server builder to maintain option when toggling
960 pipe mode ([#5336]).
961
962 [#5336]: https://github.com/tokio-rs/tokio/pull/5336
963
964 # 1.23.0 (December 5, 2022)
965
966 ### Fixed
967
968 - net: fix Windows named pipe connect ([#5208])
969 - io: support vectored writes for `ChildStdin` ([#5216])
970 - io: fix `async fn ready()` false positive for OS-specific events ([#5231])
971
972 ### Changed
973 - runtime: `yield_now` defers task until after driver poll ([#5223])
974 - runtime: reduce amount of codegen needed per spawned task ([#5213])
975 - windows: replace `winapi` dependency with `windows-sys` ([#5204])
976
977 [#5208]: https://github.com/tokio-rs/tokio/pull/5208
978 [#5216]: https://github.com/tokio-rs/tokio/pull/5216
979 [#5213]: https://github.com/tokio-rs/tokio/pull/5213
980 [#5204]: https://github.com/tokio-rs/tokio/pull/5204
981 [#5223]: https://github.com/tokio-rs/tokio/pull/5223
982 [#5231]: https://github.com/tokio-rs/tokio/pull/5231
983
984 # 1.22.0 (November 17, 2022)
985
986 ### Added
987 - runtime: add `Handle::runtime_flavor` ([#5138])
988 - sync: add `Mutex::blocking_lock_owned` ([#5130])
989 - sync: add `Semaphore::MAX_PERMITS` ([#5144])
990 - sync: add `merge()` to semaphore permits ([#4948])
991 - sync: add `mpsc::WeakUnboundedSender` ([#5189])
992
993 ### Added (unstable)
994
995 - process: add `Command::process_group` ([#5114])
996 - runtime: export metrics about the blocking thread pool ([#5161])
997 - task: add `task::id()` and `task::try_id()` ([#5171])
998
999 ### Fixed
1000 - macros: don't take ownership of futures in macros ([#5087])
1001 - runtime: fix Stacked Borrows violation in `LocalOwnedTasks` ([#5099])
1002 - runtime: mitigate ABA with 32-bit queue indices when possible ([#5042])
1003 - task: wake local tasks to the local queue when woken by the same thread ([#5095])
1004 - time: panic in release mode when `mark_pending` called illegally ([#5093])
1005 - runtime: fix typo in expect message ([#5169])
1006 - runtime: fix `unsync_load` on atomic types ([#5175])
1007 - task: elaborate safety comments in task deallocation ([#5172])
1008 - runtime: fix `LocalSet` drop in thread local ([#5179])
1009 - net: remove libc type leakage in a public API ([#5191])
1010 - runtime: update the alignment of `CachePadded` ([#5106])
1011
1012 ### Changed
1013 - io: make `tokio::io::copy` continue filling the buffer when writer stalls ([#5066])
1014 - runtime: remove `coop::budget` from `LocalSet::run_until` ([#5155])
1015 - sync: make `Notify` panic safe ([#5154])
1016
1017 ### Documented
1018 - io: fix doc for `write_i8` to use signed integers ([#5040])
1019 - net: fix doc typos for TCP and UDP `set_tos` methods ([#5073])
1020 - net: fix function name in `UdpSocket::recv` documentation ([#5150])
1021 - sync: typo in `TryLockError` for `RwLock::try_write` ([#5160])
1022 - task: document that spawned tasks execute immediately ([#5117])
1023 - time: document return type of `timeout` ([#5118])
1024 - time: document that `timeout` checks only before poll ([#5126])
1025 - sync: specify return type of `oneshot::Receiver` in docs ([#5198])
1026
1027 ### Internal changes
1028 - runtime: use const `Mutex::new` for globals ([#5061])
1029 - runtime: remove `Option` around `mio::Events` in io driver ([#5078])
1030 - runtime: remove a conditional compilation clause ([#5104])
1031 - runtime: remove a reference to internal time handle ([#5107])
1032 - runtime: misc time driver cleanup ([#5120])
1033 - runtime: move signal driver to runtime module ([#5121])
1034 - runtime: signal driver now uses I/O driver directly ([#5125])
1035 - runtime: start decoupling I/O driver and I/O handle ([#5127])
1036 - runtime: switch `io::handle` refs with scheduler:Handle ([#5128])
1037 - runtime: remove Arc from I/O driver ([#5134])
1038 - runtime: use signal driver handle via `scheduler::Handle` ([#5135])
1039 - runtime: move internal clock fns out of context ([#5139])
1040 - runtime: remove `runtime::context` module ([#5140])
1041 - runtime: keep driver cfgs in `driver.rs` ([#5141])
1042 - runtime: add `runtime::context` to unify thread-locals ([#5143])
1043 - runtime: rename some confusing internal variables/fns ([#5151])
1044 - runtime: move `coop` mod into `runtime` ([#5152])
1045 - runtime: move budget state to context thread-local ([#5157])
1046 - runtime: move park logic into runtime module ([#5158])
1047 - runtime: move `Runtime` into its own file ([#5159])
1048 - runtime: unify entering a runtime with `Handle::enter` ([#5163])
1049 - runtime: remove handle reference from each scheduler ([#5166])
1050 - runtime: move `enter` into `context` ([#5167])
1051 - runtime: combine context and entered thread-locals ([#5168])
1052 - runtime: fix accidental unsetting of current handle ([#5178])
1053 - runtime: move `CoreStage` methods to `Core` ([#5182])
1054 - sync: name mpsc semaphore types ([#5146])
1055
1056 [#4948]: https://github.com/tokio-rs/tokio/pull/4948
1057 [#5040]: https://github.com/tokio-rs/tokio/pull/5040
1058 [#5042]: https://github.com/tokio-rs/tokio/pull/5042
1059 [#5061]: https://github.com/tokio-rs/tokio/pull/5061
1060 [#5066]: https://github.com/tokio-rs/tokio/pull/5066
1061 [#5073]: https://github.com/tokio-rs/tokio/pull/5073
1062 [#5078]: https://github.com/tokio-rs/tokio/pull/5078
1063 [#5087]: https://github.com/tokio-rs/tokio/pull/5087
1064 [#5093]: https://github.com/tokio-rs/tokio/pull/5093
1065 [#5095]: https://github.com/tokio-rs/tokio/pull/5095
1066 [#5099]: https://github.com/tokio-rs/tokio/pull/5099
1067 [#5104]: https://github.com/tokio-rs/tokio/pull/5104
1068 [#5106]: https://github.com/tokio-rs/tokio/pull/5106
1069 [#5107]: https://github.com/tokio-rs/tokio/pull/5107
1070 [#5114]: https://github.com/tokio-rs/tokio/pull/5114
1071 [#5117]: https://github.com/tokio-rs/tokio/pull/5117
1072 [#5118]: https://github.com/tokio-rs/tokio/pull/5118
1073 [#5120]: https://github.com/tokio-rs/tokio/pull/5120
1074 [#5121]: https://github.com/tokio-rs/tokio/pull/5121
1075 [#5125]: https://github.com/tokio-rs/tokio/pull/5125
1076 [#5126]: https://github.com/tokio-rs/tokio/pull/5126
1077 [#5127]: https://github.com/tokio-rs/tokio/pull/5127
1078 [#5128]: https://github.com/tokio-rs/tokio/pull/5128
1079 [#5130]: https://github.com/tokio-rs/tokio/pull/5130
1080 [#5134]: https://github.com/tokio-rs/tokio/pull/5134
1081 [#5135]: https://github.com/tokio-rs/tokio/pull/5135
1082 [#5138]: https://github.com/tokio-rs/tokio/pull/5138
1083 [#5138]: https://github.com/tokio-rs/tokio/pull/5138
1084 [#5139]: https://github.com/tokio-rs/tokio/pull/5139
1085 [#5140]: https://github.com/tokio-rs/tokio/pull/5140
1086 [#5141]: https://github.com/tokio-rs/tokio/pull/5141
1087 [#5143]: https://github.com/tokio-rs/tokio/pull/5143
1088 [#5144]: https://github.com/tokio-rs/tokio/pull/5144
1089 [#5144]: https://github.com/tokio-rs/tokio/pull/5144
1090 [#5146]: https://github.com/tokio-rs/tokio/pull/5146
1091 [#5150]: https://github.com/tokio-rs/tokio/pull/5150
1092 [#5151]: https://github.com/tokio-rs/tokio/pull/5151
1093 [#5152]: https://github.com/tokio-rs/tokio/pull/5152
1094 [#5154]: https://github.com/tokio-rs/tokio/pull/5154
1095 [#5155]: https://github.com/tokio-rs/tokio/pull/5155
1096 [#5157]: https://github.com/tokio-rs/tokio/pull/5157
1097 [#5158]: https://github.com/tokio-rs/tokio/pull/5158
1098 [#5159]: https://github.com/tokio-rs/tokio/pull/5159
1099 [#5160]: https://github.com/tokio-rs/tokio/pull/5160
1100 [#5161]: https://github.com/tokio-rs/tokio/pull/5161
1101 [#5163]: https://github.com/tokio-rs/tokio/pull/5163
1102 [#5166]: https://github.com/tokio-rs/tokio/pull/5166
1103 [#5167]: https://github.com/tokio-rs/tokio/pull/5167
1104 [#5168]: https://github.com/tokio-rs/tokio/pull/5168
1105 [#5169]: https://github.com/tokio-rs/tokio/pull/5169
1106 [#5171]: https://github.com/tokio-rs/tokio/pull/5171
1107 [#5172]: https://github.com/tokio-rs/tokio/pull/5172
1108 [#5175]: https://github.com/tokio-rs/tokio/pull/5175
1109 [#5178]: https://github.com/tokio-rs/tokio/pull/5178
1110 [#5179]: https://github.com/tokio-rs/tokio/pull/5179
1111 [#5182]: https://github.com/tokio-rs/tokio/pull/5182
1112 [#5189]: https://github.com/tokio-rs/tokio/pull/5189
1113 [#5191]: https://github.com/tokio-rs/tokio/pull/5191
1114 [#5198]: https://github.com/tokio-rs/tokio/pull/5198
1115
1116 # 1.21.2 (September 27, 2022)
1117
1118 This release removes the dependency on the `once_cell` crate to restore the MSRV
1119 of 1.21.x, which is the latest minor version at the time of release. ([#5048])
1120
1121 [#5048]: https://github.com/tokio-rs/tokio/pull/5048
1122
1123 # 1.21.1 (September 13, 2022)
1124
1125 ### Fixed
1126
1127 - net: fix dependency resolution for socket2 ([#5000])
1128 - task: ignore failure to set TLS in `LocalSet` Drop ([#4976])
1129
1130 [#4976]: https://github.com/tokio-rs/tokio/pull/4976
1131 [#5000]: https://github.com/tokio-rs/tokio/pull/5000
1132
1133 # 1.21.0 (September 2, 2022)
1134
1135 This release is the first release of Tokio to intentionally support WASM. The
1136 `sync,macros,io-util,rt,time` features are stabilized on WASM. Additionally the
1137 wasm32-wasi target is given unstable support for the `net` feature.
1138
1139 ### Added
1140
1141 - net: add `device` and `bind_device` methods to TCP/UDP sockets ([#4882])
1142 - net: add `tos` and `set_tos` methods to TCP and UDP sockets ([#4877])
1143 - net: add security flags to named pipe `ServerOptions` ([#4845])
1144 - signal: add more windows signal handlers ([#4924])
1145 - sync: add `mpsc::Sender::max_capacity` method ([#4904])
1146 - sync: implement Weak version of `mpsc::Sender` ([#4595])
1147 - task: add `LocalSet::enter` ([#4765])
1148 - task: stabilize `JoinSet` and `AbortHandle` ([#4920])
1149 - tokio: add `track_caller` to public APIs ([#4805], [#4848], [#4852])
1150 - wasm: initial support for `wasm32-wasi` target ([#4716])
1151
1152 ### Fixed
1153
1154 - miri: improve miri compatibility by avoiding temporary references in `linked_list::Link` impls ([#4841])
1155 - signal: don't register write interest on signal pipe ([#4898])
1156 - sync: add `#[must_use]` to lock guards ([#4886])
1157 - sync: fix hang when calling `recv` on closed and reopened broadcast channel ([#4867])
1158 - task: propagate attributes on task-locals ([#4837])
1159
1160 ### Changed
1161
1162 - fs: change panic to error in `File::start_seek` ([#4897])
1163 - io: reduce syscalls in `poll_read` ([#4840])
1164 - process: use blocking threadpool for child stdio I/O ([#4824])
1165 - signal: make `SignalKind` methods const ([#4956])
1166
1167 ### Internal changes
1168
1169 - rt: extract `basic_scheduler::Config` ([#4935])
1170 - rt: move I/O driver into `runtime` module ([#4942])
1171 - rt: rename internal scheduler types ([#4945])
1172
1173 ### Documented
1174
1175 - chore: fix typos and grammar ([#4858], [#4894], [#4928])
1176 - io: fix typo in `AsyncSeekExt::rewind` docs ([#4893])
1177 - net: add documentation to `try_read()` for zero-length buffers ([#4937])
1178 - runtime: remove incorrect panic section for `Builder::worker_threads` ([#4849])
1179 - sync: doc of `watch::Sender::send` improved ([#4959])
1180 - task: add cancel safety docs to `JoinHandle` ([#4901])
1181 - task: expand on cancellation of `spawn_blocking` ([#4811])
1182 - time: clarify that the first tick of `Interval::tick` happens immediately ([#4951])
1183
1184 ### Unstable
1185
1186 - rt: add unstable option to disable the LIFO slot ([#4936])
1187 - task: fix incorrect signature in `Builder::spawn_on` ([#4953])
1188 - task: make `task::Builder::spawn*` methods fallible ([#4823])
1189
1190 [#4595]: https://github.com/tokio-rs/tokio/pull/4595
1191 [#4716]: https://github.com/tokio-rs/tokio/pull/4716
1192 [#4765]: https://github.com/tokio-rs/tokio/pull/4765
1193 [#4805]: https://github.com/tokio-rs/tokio/pull/4805
1194 [#4811]: https://github.com/tokio-rs/tokio/pull/4811
1195 [#4823]: https://github.com/tokio-rs/tokio/pull/4823
1196 [#4824]: https://github.com/tokio-rs/tokio/pull/4824
1197 [#4837]: https://github.com/tokio-rs/tokio/pull/4837
1198 [#4840]: https://github.com/tokio-rs/tokio/pull/4840
1199 [#4841]: https://github.com/tokio-rs/tokio/pull/4841
1200 [#4845]: https://github.com/tokio-rs/tokio/pull/4845
1201 [#4848]: https://github.com/tokio-rs/tokio/pull/4848
1202 [#4849]: https://github.com/tokio-rs/tokio/pull/4849
1203 [#4852]: https://github.com/tokio-rs/tokio/pull/4852
1204 [#4858]: https://github.com/tokio-rs/tokio/pull/4858
1205 [#4867]: https://github.com/tokio-rs/tokio/pull/4867
1206 [#4877]: https://github.com/tokio-rs/tokio/pull/4877
1207 [#4882]: https://github.com/tokio-rs/tokio/pull/4882
1208 [#4886]: https://github.com/tokio-rs/tokio/pull/4886
1209 [#4893]: https://github.com/tokio-rs/tokio/pull/4893
1210 [#4894]: https://github.com/tokio-rs/tokio/pull/4894
1211 [#4897]: https://github.com/tokio-rs/tokio/pull/4897
1212 [#4898]: https://github.com/tokio-rs/tokio/pull/4898
1213 [#4901]: https://github.com/tokio-rs/tokio/pull/4901
1214 [#4904]: https://github.com/tokio-rs/tokio/pull/4904
1215 [#4920]: https://github.com/tokio-rs/tokio/pull/4920
1216 [#4924]: https://github.com/tokio-rs/tokio/pull/4924
1217 [#4928]: https://github.com/tokio-rs/tokio/pull/4928
1218 [#4935]: https://github.com/tokio-rs/tokio/pull/4935
1219 [#4936]: https://github.com/tokio-rs/tokio/pull/4936
1220 [#4937]: https://github.com/tokio-rs/tokio/pull/4937
1221 [#4942]: https://github.com/tokio-rs/tokio/pull/4942
1222 [#4945]: https://github.com/tokio-rs/tokio/pull/4945
1223 [#4951]: https://github.com/tokio-rs/tokio/pull/4951
1224 [#4953]: https://github.com/tokio-rs/tokio/pull/4953
1225 [#4956]: https://github.com/tokio-rs/tokio/pull/4956
1226 [#4959]: https://github.com/tokio-rs/tokio/pull/4959
1227
1228 # 1.20.6 (September 22, 2023)
1229
1230 This is a backport of a change from 1.27.0.
1231
1232 ### Changed
1233
1234 - io: use `memchr` from `libc` ([#5960])
1235
1236 [#5960]: https://github.com/tokio-rs/tokio/pull/5960
1237
1238 # 1.20.5 (May 28, 2023)
1239
1240 Forward ports 1.18.6 changes.
1241
1242 ### Fixed
1243
1244 - deps: disable default features for mio ([#5728])
1245
1246 [#5728]: https://github.com/tokio-rs/tokio/pull/5728
1247
1248 # 1.20.4 (January 17, 2023)
1249
1250 Forward ports 1.18.5 changes.
1251
1252 ### Fixed
1253
1254 - io: fix unsoundness in `ReadHalf::unsplit` ([#5375])
1255
1256 [#5375]: https://github.com/tokio-rs/tokio/pull/5375
1257
1258 # 1.20.3 (January 3, 2022)
1259
1260 This release forward ports changes from 1.18.4.
1261
1262 ### Fixed
1263
1264 - net: fix Windows named pipe server builder to maintain option when toggling
1265 pipe mode ([#5336]).
1266
1267 [#5336]: https://github.com/tokio-rs/tokio/pull/5336
1268
1269 # 1.20.2 (September 27, 2022)
1270
1271 This release removes the dependency on the `once_cell` crate to restore the MSRV
1272 of the 1.20.x LTS release. ([#5048])
1273
1274 [#5048]: https://github.com/tokio-rs/tokio/pull/5048
1275
1276 # 1.20.1 (July 25, 2022)
1277
1278 ### Fixed
1279
1280 - chore: fix version detection in build script ([#4860])
1281
1282 [#4860]: https://github.com/tokio-rs/tokio/pull/4860
1283
1284 # 1.20.0 (July 12, 2022)
1285
1286 ### Added
1287 - tokio: add `track_caller` to public APIs ([#4772], [#4791], [#4793], [#4806], [#4808])
1288 - sync: Add `has_changed` method to `watch::Ref` ([#4758])
1289
1290 ### Changed
1291
1292 - time: remove `src/time/driver/wheel/stack.rs` ([#4766])
1293 - rt: clean up arguments passed to basic scheduler ([#4767])
1294 - net: be more specific about winapi features ([#4764])
1295 - tokio: use const initialized thread locals where possible ([#4677])
1296 - task: various small improvements to LocalKey ([#4795])
1297
1298 ### Documented
1299
1300 - fs: warn about performance pitfall ([#4762])
1301 - chore: fix spelling ([#4769])
1302 - sync: document spurious failures in oneshot ([#4777])
1303 - sync: add warning for watch in non-Send futures ([#4741])
1304 - chore: fix typo ([#4798])
1305
1306 ### Unstable
1307
1308 - joinset: rename `join_one` to `join_next` ([#4755])
1309 - rt: unhandled panic config for current thread rt ([#4770])
1310
1311 [#4677]: https://github.com/tokio-rs/tokio/pull/4677
1312 [#4741]: https://github.com/tokio-rs/tokio/pull/4741
1313 [#4755]: https://github.com/tokio-rs/tokio/pull/4755
1314 [#4758]: https://github.com/tokio-rs/tokio/pull/4758
1315 [#4762]: https://github.com/tokio-rs/tokio/pull/4762
1316 [#4764]: https://github.com/tokio-rs/tokio/pull/4764
1317 [#4766]: https://github.com/tokio-rs/tokio/pull/4766
1318 [#4767]: https://github.com/tokio-rs/tokio/pull/4767
1319 [#4769]: https://github.com/tokio-rs/tokio/pull/4769
1320 [#4770]: https://github.com/tokio-rs/tokio/pull/4770
1321 [#4772]: https://github.com/tokio-rs/tokio/pull/4772
1322 [#4777]: https://github.com/tokio-rs/tokio/pull/4777
1323 [#4791]: https://github.com/tokio-rs/tokio/pull/4791
1324 [#4793]: https://github.com/tokio-rs/tokio/pull/4793
1325 [#4795]: https://github.com/tokio-rs/tokio/pull/4795
1326 [#4798]: https://github.com/tokio-rs/tokio/pull/4798
1327 [#4806]: https://github.com/tokio-rs/tokio/pull/4806
1328 [#4808]: https://github.com/tokio-rs/tokio/pull/4808
1329
1330 # 1.19.2 (June 6, 2022)
1331
1332 This release fixes another bug in `Notified::enable`. ([#4751])
1333
1334 [#4751]: https://github.com/tokio-rs/tokio/pull/4751
1335
1336 # 1.19.1 (June 5, 2022)
1337
1338 This release fixes a bug in `Notified::enable`. ([#4747])
1339
1340 [#4747]: https://github.com/tokio-rs/tokio/pull/4747
1341
1342 # 1.19.0 (June 3, 2022)
1343
1344 ### Added
1345
1346 - runtime: add `is_finished` method for `JoinHandle` and `AbortHandle` ([#4709])
1347 - runtime: make global queue and event polling intervals configurable ([#4671])
1348 - sync: add `Notified::enable` ([#4705])
1349 - sync: add `watch::Sender::send_if_modified` ([#4591])
1350 - sync: add resubscribe method to broadcast::Receiver ([#4607])
1351 - net: add `take_error` to `TcpSocket` and `TcpStream` ([#4739])
1352
1353 ### Changed
1354
1355 - io: refactor out usage of Weak in the io handle ([#4656])
1356
1357 ### Fixed
1358
1359 - macros: avoid starvation in `join!` and `try_join!` ([#4624])
1360
1361 ### Documented
1362
1363 - runtime: clarify semantics of tasks outliving `block_on` ([#4729])
1364 - time: fix example for `MissedTickBehavior::Burst` ([#4713])
1365
1366 ### Unstable
1367
1368 - metrics: correctly update atomics in `IoDriverMetrics` ([#4725])
1369 - metrics: fix compilation with unstable, process, and rt, but without net ([#4682])
1370 - task: add `#[track_caller]` to `JoinSet`/`JoinMap` ([#4697])
1371 - task: add `Builder::{spawn_on, spawn_local_on, spawn_blocking_on}` ([#4683])
1372 - task: add `consume_budget` for cooperative scheduling ([#4498])
1373 - task: add `join_set::Builder` for configuring `JoinSet` tasks ([#4687])
1374 - task: update return value of `JoinSet::join_one` ([#4726])
1375
1376 [#4498]: https://github.com/tokio-rs/tokio/pull/4498
1377 [#4591]: https://github.com/tokio-rs/tokio/pull/4591
1378 [#4607]: https://github.com/tokio-rs/tokio/pull/4607
1379 [#4624]: https://github.com/tokio-rs/tokio/pull/4624
1380 [#4656]: https://github.com/tokio-rs/tokio/pull/4656
1381 [#4671]: https://github.com/tokio-rs/tokio/pull/4671
1382 [#4682]: https://github.com/tokio-rs/tokio/pull/4682
1383 [#4683]: https://github.com/tokio-rs/tokio/pull/4683
1384 [#4687]: https://github.com/tokio-rs/tokio/pull/4687
1385 [#4697]: https://github.com/tokio-rs/tokio/pull/4697
1386 [#4705]: https://github.com/tokio-rs/tokio/pull/4705
1387 [#4709]: https://github.com/tokio-rs/tokio/pull/4709
1388 [#4713]: https://github.com/tokio-rs/tokio/pull/4713
1389 [#4725]: https://github.com/tokio-rs/tokio/pull/4725
1390 [#4726]: https://github.com/tokio-rs/tokio/pull/4726
1391 [#4729]: https://github.com/tokio-rs/tokio/pull/4729
1392 [#4739]: https://github.com/tokio-rs/tokio/pull/4739
1393
1394 # 1.18.6 (May 28, 2023)
1395
1396 ### Fixed
1397
1398 - deps: disable default features for mio ([#5728])
1399
1400 [#5728]: https://github.com/tokio-rs/tokio/pull/5728
1401
1402 # 1.18.5 (January 17, 2023)
1403
1404 ### Fixed
1405
1406 - io: fix unsoundness in `ReadHalf::unsplit` ([#5375])
1407
1408 [#5375]: https://github.com/tokio-rs/tokio/pull/5375
1409
1410 # 1.18.4 (January 3, 2022)
1411
1412 ### Fixed
1413
1414 - net: fix Windows named pipe server builder to maintain option when toggling
1415 pipe mode ([#5336]).
1416
1417 [#5336]: https://github.com/tokio-rs/tokio/pull/5336
1418
1419 # 1.18.3 (September 27, 2022)
1420
1421 This release removes the dependency on the `once_cell` crate to restore the MSRV
1422 of the 1.18.x LTS release. ([#5048])
1423
1424 [#5048]: https://github.com/tokio-rs/tokio/pull/5048
1425
1426 # 1.18.2 (May 5, 2022)
1427
1428 Add missing features for the `winapi` dependency. ([#4663])
1429
1430 [#4663]: https://github.com/tokio-rs/tokio/pull/4663
1431
1432 # 1.18.1 (May 2, 2022)
1433
1434 The 1.18.0 release broke the build for targets without 64-bit atomics when
1435 building with `tokio_unstable`. This release fixes that. ([#4649])
1436
1437 [#4649]: https://github.com/tokio-rs/tokio/pull/4649
1438
1439 # 1.18.0 (April 27, 2022)
1440
1441 This release adds a number of new APIs in `tokio::net`, `tokio::signal`, and
1442 `tokio::sync`. In addition, it adds new unstable APIs to `tokio::task` (`Id`s
1443 for uniquely identifying a task, and `AbortHandle` for remotely cancelling a
1444 task), as well as a number of bugfixes.
1445
1446 ### Fixed
1447
1448 - blocking: add missing `#[track_caller]` for `spawn_blocking` ([#4616])
1449 - macros: fix `select` macro to process 64 branches ([#4519])
1450 - net: fix `try_io` methods not calling Mio's `try_io` internally ([#4582])
1451 - runtime: recover when OS fails to spawn a new thread ([#4485])
1452
1453 ### Added
1454
1455 - net: add `UdpSocket::peer_addr` ([#4611])
1456 - net: add `try_read_buf` method for named pipes ([#4626])
1457 - signal: add `SignalKind` `Hash`/`Eq` impls and `c_int` conversion ([#4540])
1458 - signal: add support for signals up to `SIGRTMAX` ([#4555])
1459 - sync: add `watch::Sender::send_modify` method ([#4310])
1460 - sync: add `broadcast::Receiver::len` method ([#4542])
1461 - sync: add `watch::Receiver::same_channel` method ([#4581])
1462 - sync: implement `Clone` for `RecvError` types ([#4560])
1463
1464 ### Changed
1465
1466 - update `mio` to 0.8.1 ([#4582])
1467 - macros: rename `tokio::select!`'s internal `util` module ([#4543])
1468 - runtime: use `Vec::with_capacity` when building runtime ([#4553])
1469
1470 ### Documented
1471
1472 - improve docs for `tokio_unstable` ([#4524])
1473 - runtime: include more documentation for thread_pool/worker ([#4511])
1474 - runtime: update `Handle::current`'s docs to mention `EnterGuard` ([#4567])
1475 - time: clarify platform specific timer resolution ([#4474])
1476 - signal: document that `Signal::recv` is cancel-safe ([#4634])
1477 - sync: `UnboundedReceiver` close docs ([#4548])
1478
1479 ### Unstable
1480
1481 The following changes only apply when building with `--cfg tokio_unstable`:
1482
1483 - task: add `task::Id` type ([#4630])
1484 - task: add `AbortHandle` type for cancelling tasks in a `JoinSet` ([#4530],
1485 [#4640])
1486 - task: fix missing `doc(cfg(...))` attributes for `JoinSet` ([#4531])
1487 - task: fix broken link in `AbortHandle` RustDoc ([#4545])
1488 - metrics: add initial IO driver metrics ([#4507])
1489
1490
1491 [#4616]: https://github.com/tokio-rs/tokio/pull/4616
1492 [#4519]: https://github.com/tokio-rs/tokio/pull/4519
1493 [#4582]: https://github.com/tokio-rs/tokio/pull/4582
1494 [#4485]: https://github.com/tokio-rs/tokio/pull/4485
1495 [#4613]: https://github.com/tokio-rs/tokio/pull/4613
1496 [#4611]: https://github.com/tokio-rs/tokio/pull/4611
1497 [#4626]: https://github.com/tokio-rs/tokio/pull/4626
1498 [#4540]: https://github.com/tokio-rs/tokio/pull/4540
1499 [#4555]: https://github.com/tokio-rs/tokio/pull/4555
1500 [#4310]: https://github.com/tokio-rs/tokio/pull/4310
1501 [#4542]: https://github.com/tokio-rs/tokio/pull/4542
1502 [#4581]: https://github.com/tokio-rs/tokio/pull/4581
1503 [#4560]: https://github.com/tokio-rs/tokio/pull/4560
1504 [#4631]: https://github.com/tokio-rs/tokio/pull/4631
1505 [#4582]: https://github.com/tokio-rs/tokio/pull/4582
1506 [#4543]: https://github.com/tokio-rs/tokio/pull/4543
1507 [#4553]: https://github.com/tokio-rs/tokio/pull/4553
1508 [#4524]: https://github.com/tokio-rs/tokio/pull/4524
1509 [#4511]: https://github.com/tokio-rs/tokio/pull/4511
1510 [#4567]: https://github.com/tokio-rs/tokio/pull/4567
1511 [#4474]: https://github.com/tokio-rs/tokio/pull/4474
1512 [#4634]: https://github.com/tokio-rs/tokio/pull/4634
1513 [#4548]: https://github.com/tokio-rs/tokio/pull/4548
1514 [#4630]: https://github.com/tokio-rs/tokio/pull/4630
1515 [#4530]: https://github.com/tokio-rs/tokio/pull/4530
1516 [#4640]: https://github.com/tokio-rs/tokio/pull/4640
1517 [#4531]: https://github.com/tokio-rs/tokio/pull/4531
1518 [#4545]: https://github.com/tokio-rs/tokio/pull/4545
1519 [#4507]: https://github.com/tokio-rs/tokio/pull/4507
1520
1521 # 1.17.0 (February 16, 2022)
1522
1523 This release updates the minimum supported Rust version (MSRV) to 1.49, the
1524 `mio` dependency to v0.8, and the (optional) `parking_lot` dependency to v0.12.
1525 Additionally, it contains several bug fixes, as well as internal refactoring and
1526 performance improvements.
1527
1528 ### Fixed
1529
1530 - time: prevent panicking in `sleep` with large durations ([#4495])
1531 - time: eliminate potential panics in `Instant` arithmetic on platforms where
1532 `Instant::now` is not monotonic ([#4461])
1533 - io: fix `DuplexStream` not participating in cooperative yielding ([#4478])
1534 - rt: fix potential double panic when dropping a `JoinHandle` ([#4430])
1535
1536 ### Changed
1537
1538 - update minimum supported Rust version to 1.49 ([#4457])
1539 - update `parking_lot` dependency to v0.12.0 ([#4459])
1540 - update `mio` dependency to v0.8 ([#4449])
1541 - rt: remove an unnecessary lock in the blocking pool ([#4436])
1542 - rt: remove an unnecessary enum in the basic scheduler ([#4462])
1543 - time: use bit manipulation instead of modulo to improve performance ([#4480])
1544 - net: use `std::future::Ready` instead of our own `Ready` future ([#4271])
1545 - replace deprecated `atomic::spin_loop_hint` with `hint::spin_loop` ([#4491])
1546 - fix miri failures in intrusive linked lists ([#4397])
1547
1548 ### Documented
1549
1550 - io: add an example for `tokio::process::ChildStdin` ([#4479])
1551
1552 ### Unstable
1553
1554 The following changes only apply when building with `--cfg tokio_unstable`:
1555
1556 - task: fix missing location information in `tracing` spans generated by
1557 `spawn_local` ([#4483])
1558 - task: add `JoinSet` for managing sets of tasks ([#4335])
1559 - metrics: fix compilation error on MIPS ([#4475])
1560 - metrics: fix compilation error on arm32v7 ([#4453])
1561
1562 [#4495]: https://github.com/tokio-rs/tokio/pull/4495
1563 [#4461]: https://github.com/tokio-rs/tokio/pull/4461
1564 [#4478]: https://github.com/tokio-rs/tokio/pull/4478
1565 [#4430]: https://github.com/tokio-rs/tokio/pull/4430
1566 [#4457]: https://github.com/tokio-rs/tokio/pull/4457
1567 [#4459]: https://github.com/tokio-rs/tokio/pull/4459
1568 [#4449]: https://github.com/tokio-rs/tokio/pull/4449
1569 [#4462]: https://github.com/tokio-rs/tokio/pull/4462
1570 [#4436]: https://github.com/tokio-rs/tokio/pull/4436
1571 [#4480]: https://github.com/tokio-rs/tokio/pull/4480
1572 [#4271]: https://github.com/tokio-rs/tokio/pull/4271
1573 [#4491]: https://github.com/tokio-rs/tokio/pull/4491
1574 [#4397]: https://github.com/tokio-rs/tokio/pull/4397
1575 [#4479]: https://github.com/tokio-rs/tokio/pull/4479
1576 [#4483]: https://github.com/tokio-rs/tokio/pull/4483
1577 [#4335]: https://github.com/tokio-rs/tokio/pull/4335
1578 [#4475]: https://github.com/tokio-rs/tokio/pull/4475
1579 [#4453]: https://github.com/tokio-rs/tokio/pull/4453
1580
1581 # 1.16.1 (January 28, 2022)
1582
1583 This release fixes a bug in [#4428] with the change [#4437].
1584
1585 [#4428]: https://github.com/tokio-rs/tokio/pull/4428
1586 [#4437]: https://github.com/tokio-rs/tokio/pull/4437
1587
1588 # 1.16.0 (January 27, 2022)
1589
1590 Fixes a soundness bug in `io::Take` ([#4428]). The unsoundness is exposed when
1591 leaking memory in the given `AsyncRead` implementation and then overwriting the
1592 supplied buffer:
1593
1594 ```rust
1595 impl AsyncRead for Buggy {
1596 fn poll_read(
1597 self: Pin<&mut Self>,
1598 cx: &mut Context<'_>,
1599 buf: &mut ReadBuf<'_>
1600 ) -> Poll<Result<()>> {
1601 let new_buf = vec![0; 5].leak();
1602 *buf = ReadBuf::new(new_buf);
1603 buf.put_slice(b"hello");
1604 Poll::Ready(Ok(()))
1605 }
1606 }
1607 ```
1608
1609 Also, this release includes improvements to the multi-threaded scheduler that
1610 can increase throughput by up to 20% in some cases ([#4383]).
1611
1612 ### Fixed
1613
1614 - io: **soundness** don't expose uninitialized memory when using `io::Take` in edge case ([#4428])
1615 - fs: ensure `File::write` results in a `write` syscall when the runtime shuts down ([#4316])
1616 - process: drop pipe after child exits in `wait_with_output` ([#4315])
1617 - rt: improve error message when spawning a thread fails ([#4398])
1618 - rt: reduce false-positive thread wakups in the multi-threaded scheduler ([#4383])
1619 - sync: don't inherit `Send` from `parking_lot::*Guard` ([#4359])
1620
1621 ### Added
1622
1623 - net: `TcpSocket::linger()` and `set_linger()` ([#4324])
1624 - net: impl `UnwindSafe` for socket types ([#4384])
1625 - rt: impl `UnwindSafe` for `JoinHandle` ([#4418])
1626 - sync: `watch::Receiver::has_changed()` ([#4342])
1627 - sync: `oneshot::Receiver::blocking_recv()` ([#4334])
1628 - sync: `RwLock` blocking operations ([#4425])
1629
1630 ### Unstable
1631
1632 The following changes only apply when building with `--cfg tokio_unstable`
1633
1634 - rt: **breaking change** overhaul runtime metrics API ([#4373])
1635
1636 [#4428]: https://github.com/tokio-rs/tokio/pull/4428
1637 [#4316]: https://github.com/tokio-rs/tokio/pull/4316
1638 [#4315]: https://github.com/tokio-rs/tokio/pull/4315
1639 [#4398]: https://github.com/tokio-rs/tokio/pull/4398
1640 [#4383]: https://github.com/tokio-rs/tokio/pull/4383
1641 [#4359]: https://github.com/tokio-rs/tokio/pull/4359
1642 [#4324]: https://github.com/tokio-rs/tokio/pull/4324
1643 [#4384]: https://github.com/tokio-rs/tokio/pull/4384
1644 [#4418]: https://github.com/tokio-rs/tokio/pull/4418
1645 [#4342]: https://github.com/tokio-rs/tokio/pull/4342
1646 [#4334]: https://github.com/tokio-rs/tokio/pull/4334
1647 [#4425]: https://github.com/tokio-rs/tokio/pull/4425
1648 [#4373]: https://github.com/tokio-rs/tokio/pull/4373
1649
1650 # 1.15.0 (December 15, 2021)
1651
1652 ### Fixed
1653
1654 - io: add cooperative yielding support to `io::empty()` ([#4300])
1655 - time: make timeout robust against budget-depleting tasks ([#4314])
1656
1657 ### Changed
1658
1659 - update minimum supported Rust version to 1.46.
1660
1661 ### Added
1662
1663 - time: add `Interval::reset()` ([#4248])
1664 - io: add explicit lifetimes to `AsyncFdReadyGuard` ([#4267])
1665 - process: add `Command::as_std()` ([#4295])
1666
1667 ### Added (unstable)
1668
1669 - tracing: instrument `tokio::sync` types ([#4302])
1670
1671 [#4302]: https://github.com/tokio-rs/tokio/pull/4302
1672 [#4300]: https://github.com/tokio-rs/tokio/pull/4300
1673 [#4295]: https://github.com/tokio-rs/tokio/pull/4295
1674 [#4267]: https://github.com/tokio-rs/tokio/pull/4267
1675 [#4248]: https://github.com/tokio-rs/tokio/pull/4248
1676 [#4314]: https://github.com/tokio-rs/tokio/pull/4314
1677
1678 # 1.14.0 (November 15, 2021)
1679
1680 ### Fixed
1681
1682 - macros: fix compiler errors when using `mut` patterns in `select!` ([#4211])
1683 - sync: fix a data race between `oneshot::Sender::send` and awaiting a
1684 `oneshot::Receiver` when the oneshot has been closed ([#4226])
1685 - sync: make `AtomicWaker` panic safe ([#3689])
1686 - runtime: fix basic scheduler dropping tasks outside a runtime context
1687 ([#4213])
1688
1689 ### Added
1690
1691 - stats: add `RuntimeStats::busy_duration_total` ([#4179], [#4223])
1692
1693 ### Changed
1694
1695 - io: updated `copy` buffer size to match `std::io::copy` ([#4209])
1696
1697 ### Documented
1698
1699 - io: rename buffer to file in doc-test ([#4230])
1700 - sync: fix Notify example ([#4212])
1701
1702 [#4211]: https://github.com/tokio-rs/tokio/pull/4211
1703 [#4226]: https://github.com/tokio-rs/tokio/pull/4226
1704 [#3689]: https://github.com/tokio-rs/tokio/pull/3689
1705 [#4213]: https://github.com/tokio-rs/tokio/pull/4213
1706 [#4179]: https://github.com/tokio-rs/tokio/pull/4179
1707 [#4223]: https://github.com/tokio-rs/tokio/pull/4223
1708 [#4209]: https://github.com/tokio-rs/tokio/pull/4209
1709 [#4230]: https://github.com/tokio-rs/tokio/pull/4230
1710 [#4212]: https://github.com/tokio-rs/tokio/pull/4212
1711
1712 # 1.13.1 (November 15, 2021)
1713
1714 ### Fixed
1715
1716 - sync: fix a data race between `oneshot::Sender::send` and awaiting a
1717 `oneshot::Receiver` when the oneshot has been closed ([#4226])
1718
1719 [#4226]: https://github.com/tokio-rs/tokio/pull/4226
1720
1721 # 1.13.0 (October 29, 2021)
1722
1723 ### Fixed
1724
1725 - sync: fix `Notify` to clone the waker before locking its waiter list ([#4129])
1726 - tokio: add riscv32 to non atomic64 architectures ([#4185])
1727
1728 ### Added
1729
1730 - net: add `poll_{recv,send}_ready` methods to `udp` and `uds_datagram` ([#4131])
1731 - net: add `try_*`, `readable`, `writable`, `ready`, and `peer_addr` methods to split halves ([#4120])
1732 - sync: add `blocking_lock` to `Mutex` ([#4130])
1733 - sync: add `watch::Sender::send_replace` ([#3962], [#4195])
1734 - sync: expand `Debug` for `Mutex<T>` impl to unsized `T` ([#4134])
1735 - tracing: instrument time::Sleep ([#4072])
1736 - tracing: use structured location fields for spawned tasks ([#4128])
1737
1738 ### Changed
1739
1740 - io: add assert in `copy_bidirectional` that `poll_write` is sensible ([#4125])
1741 - macros: use qualified syntax when polling in `select!` ([#4192])
1742 - runtime: handle `block_on` wakeups better ([#4157])
1743 - task: allocate callback on heap immediately in debug mode ([#4203])
1744 - tokio: assert platform-minimum requirements at build time ([#3797])
1745
1746 ### Documented
1747
1748 - docs: conversion of doc comments to indicative mood ([#4174])
1749 - docs: add returning on the first error example for `try_join!` ([#4133])
1750 - docs: fixing broken links in `tokio/src/lib.rs` ([#4132])
1751 - signal: add example with background listener ([#4171])
1752 - sync: add more oneshot examples ([#4153])
1753 - time: document `Interval::tick` cancel safety ([#4152])
1754
1755 [#3797]: https://github.com/tokio-rs/tokio/pull/3797
1756 [#3962]: https://github.com/tokio-rs/tokio/pull/3962
1757 [#4072]: https://github.com/tokio-rs/tokio/pull/4072
1758 [#4120]: https://github.com/tokio-rs/tokio/pull/4120
1759 [#4125]: https://github.com/tokio-rs/tokio/pull/4125
1760 [#4128]: https://github.com/tokio-rs/tokio/pull/4128
1761 [#4129]: https://github.com/tokio-rs/tokio/pull/4129
1762 [#4130]: https://github.com/tokio-rs/tokio/pull/4130
1763 [#4131]: https://github.com/tokio-rs/tokio/pull/4131
1764 [#4132]: https://github.com/tokio-rs/tokio/pull/4132
1765 [#4133]: https://github.com/tokio-rs/tokio/pull/4133
1766 [#4134]: https://github.com/tokio-rs/tokio/pull/4134
1767 [#4152]: https://github.com/tokio-rs/tokio/pull/4152
1768 [#4153]: https://github.com/tokio-rs/tokio/pull/4153
1769 [#4157]: https://github.com/tokio-rs/tokio/pull/4157
1770 [#4171]: https://github.com/tokio-rs/tokio/pull/4171
1771 [#4174]: https://github.com/tokio-rs/tokio/pull/4174
1772 [#4185]: https://github.com/tokio-rs/tokio/pull/4185
1773 [#4192]: https://github.com/tokio-rs/tokio/pull/4192
1774 [#4195]: https://github.com/tokio-rs/tokio/pull/4195
1775 [#4203]: https://github.com/tokio-rs/tokio/pull/4203
1776
1777 # 1.12.0 (September 21, 2021)
1778
1779 ### Fixed
1780
1781 - mpsc: ensure `try_reserve` error is consistent with `try_send` ([#4119])
1782 - mpsc: use `spin_loop_hint` instead of `yield_now` ([#4115])
1783 - sync: make `SendError` field public ([#4097])
1784
1785 ### Added
1786
1787 - io: add POSIX AIO on FreeBSD ([#4054])
1788 - io: add convenience method `AsyncSeekExt::rewind` ([#4107])
1789 - runtime: add tracing span for `block_on` futures ([#4094])
1790 - runtime: callback when a worker parks and unparks ([#4070])
1791 - sync: implement `try_recv` for mpsc channels ([#4113])
1792
1793 ### Documented
1794
1795 - docs: clarify CPU-bound tasks on Tokio ([#4105])
1796 - mpsc: document spurious failures on `poll_recv` ([#4117])
1797 - mpsc: document that `PollSender` impls `Sink` ([#4110])
1798 - task: document non-guarantees of `yield_now` ([#4091])
1799 - time: document paused time details better ([#4061], [#4103])
1800
1801 [#4027]: https://github.com/tokio-rs/tokio/pull/4027
1802 [#4054]: https://github.com/tokio-rs/tokio/pull/4054
1803 [#4061]: https://github.com/tokio-rs/tokio/pull/4061
1804 [#4070]: https://github.com/tokio-rs/tokio/pull/4070
1805 [#4091]: https://github.com/tokio-rs/tokio/pull/4091
1806 [#4094]: https://github.com/tokio-rs/tokio/pull/4094
1807 [#4097]: https://github.com/tokio-rs/tokio/pull/4097
1808 [#4103]: https://github.com/tokio-rs/tokio/pull/4103
1809 [#4105]: https://github.com/tokio-rs/tokio/pull/4105
1810 [#4107]: https://github.com/tokio-rs/tokio/pull/4107
1811 [#4110]: https://github.com/tokio-rs/tokio/pull/4110
1812 [#4113]: https://github.com/tokio-rs/tokio/pull/4113
1813 [#4115]: https://github.com/tokio-rs/tokio/pull/4115
1814 [#4117]: https://github.com/tokio-rs/tokio/pull/4117
1815 [#4119]: https://github.com/tokio-rs/tokio/pull/4119
1816
1817 # 1.11.0 (August 31, 2021)
1818
1819 ### Fixed
1820
1821 - time: don't panic when Instant is not monotonic ([#4044])
1822 - io: fix panic in `fill_buf` by not calling `poll_fill_buf` twice ([#4084])
1823
1824 ### Added
1825
1826 - watch: add `watch::Sender::subscribe` ([#3800])
1827 - process: add `from_std` to `ChildStd*` ([#4045])
1828 - stats: initial work on runtime stats ([#4043])
1829
1830 ### Changed
1831
1832 - tracing: change span naming to new console convention ([#4042])
1833 - io: speed-up waking by using uninitialized array ([#4055], [#4071], [#4075])
1834
1835 ### Documented
1836
1837 - time: make Sleep examples easier to find ([#4040])
1838
1839 [#3800]: https://github.com/tokio-rs/tokio/pull/3800
1840 [#4040]: https://github.com/tokio-rs/tokio/pull/4040
1841 [#4042]: https://github.com/tokio-rs/tokio/pull/4042
1842 [#4043]: https://github.com/tokio-rs/tokio/pull/4043
1843 [#4044]: https://github.com/tokio-rs/tokio/pull/4044
1844 [#4045]: https://github.com/tokio-rs/tokio/pull/4045
1845 [#4055]: https://github.com/tokio-rs/tokio/pull/4055
1846 [#4071]: https://github.com/tokio-rs/tokio/pull/4071
1847 [#4075]: https://github.com/tokio-rs/tokio/pull/4075
1848 [#4084]: https://github.com/tokio-rs/tokio/pull/4084
1849
1850 # 1.10.1 (August 24, 2021)
1851
1852 ### Fixed
1853
1854 - runtime: fix leak in UnownedTask ([#4063])
1855
1856 [#4063]: https://github.com/tokio-rs/tokio/pull/4063
1857
1858 # 1.10.0 (August 12, 2021)
1859
1860 ### Added
1861
1862 - io: add `(read|write)_f(32|64)[_le]` methods ([#4022])
1863 - io: add `fill_buf` and `consume` to `AsyncBufReadExt` ([#3991])
1864 - process: add `Child::raw_handle()` on windows ([#3998])
1865
1866 ### Fixed
1867
1868 - doc: fix non-doc builds with `--cfg docsrs` ([#4020])
1869 - io: flush eagerly in `io::copy` ([#4001])
1870 - runtime: a debug assert was sometimes triggered during shutdown ([#4005])
1871 - sync: use `spin_loop_hint` instead of `yield_now` in mpsc ([#4037])
1872 - tokio: the test-util feature depends on rt, sync, and time ([#4036])
1873
1874 ### Changes
1875
1876 - runtime: reorganize parts of the runtime ([#3979], [#4005])
1877 - signal: make windows docs for signal module show up on unix builds ([#3770])
1878 - task: quickly send task to heap on debug mode ([#4009])
1879
1880 ### Documented
1881
1882 - io: document cancellation safety of `AsyncBufReadExt` ([#3997])
1883 - sync: document when `watch::send` fails ([#4021])
1884
1885 [#3770]: https://github.com/tokio-rs/tokio/pull/3770
1886 [#3979]: https://github.com/tokio-rs/tokio/pull/3979
1887 [#3991]: https://github.com/tokio-rs/tokio/pull/3991
1888 [#3997]: https://github.com/tokio-rs/tokio/pull/3997
1889 [#3998]: https://github.com/tokio-rs/tokio/pull/3998
1890 [#4001]: https://github.com/tokio-rs/tokio/pull/4001
1891 [#4005]: https://github.com/tokio-rs/tokio/pull/4005
1892 [#4009]: https://github.com/tokio-rs/tokio/pull/4009
1893 [#4020]: https://github.com/tokio-rs/tokio/pull/4020
1894 [#4021]: https://github.com/tokio-rs/tokio/pull/4021
1895 [#4022]: https://github.com/tokio-rs/tokio/pull/4022
1896 [#4036]: https://github.com/tokio-rs/tokio/pull/4036
1897 [#4037]: https://github.com/tokio-rs/tokio/pull/4037
1898
1899 # 1.9.0 (July 22, 2021)
1900
1901 ### Added
1902
1903 - net: allow customized I/O operations for `TcpStream` ([#3888])
1904 - sync: add getter for the mutex from a guard ([#3928])
1905 - task: expose nameable future for `TaskLocal::scope` ([#3273])
1906
1907 ### Fixed
1908
1909 - Fix leak if output of future panics on drop ([#3967])
1910 - Fix leak in `LocalSet` ([#3978])
1911
1912 ### Changes
1913
1914 - runtime: reorganize parts of the runtime ([#3909], [#3939], [#3950], [#3955], [#3980])
1915 - sync: clean up `OnceCell` ([#3945])
1916 - task: remove mutex in `JoinError` ([#3959])
1917
1918 [#3273]: https://github.com/tokio-rs/tokio/pull/3273
1919 [#3888]: https://github.com/tokio-rs/tokio/pull/3888
1920 [#3909]: https://github.com/tokio-rs/tokio/pull/3909
1921 [#3928]: https://github.com/tokio-rs/tokio/pull/3928
1922 [#3934]: https://github.com/tokio-rs/tokio/pull/3934
1923 [#3939]: https://github.com/tokio-rs/tokio/pull/3939
1924 [#3945]: https://github.com/tokio-rs/tokio/pull/3945
1925 [#3950]: https://github.com/tokio-rs/tokio/pull/3950
1926 [#3955]: https://github.com/tokio-rs/tokio/pull/3955
1927 [#3959]: https://github.com/tokio-rs/tokio/pull/3959
1928 [#3967]: https://github.com/tokio-rs/tokio/pull/3967
1929 [#3978]: https://github.com/tokio-rs/tokio/pull/3978
1930 [#3980]: https://github.com/tokio-rs/tokio/pull/3980
1931
1932 # 1.8.3 (July 26, 2021)
1933
1934 This release backports two fixes from 1.9.0
1935
1936 ### Fixed
1937
1938 - Fix leak if output of future panics on drop ([#3967])
1939 - Fix leak in `LocalSet` ([#3978])
1940
1941 [#3967]: https://github.com/tokio-rs/tokio/pull/3967
1942 [#3978]: https://github.com/tokio-rs/tokio/pull/3978
1943
1944 # 1.8.2 (July 19, 2021)
1945
1946 Fixes a missed edge case from 1.8.1.
1947
1948 ### Fixed
1949
1950 - runtime: drop canceled future on next poll ([#3965])
1951
1952 [#3965]: https://github.com/tokio-rs/tokio/pull/3965
1953
1954 # 1.8.1 (July 6, 2021)
1955
1956 Forward ports 1.5.1 fixes.
1957
1958 ### Fixed
1959
1960 - runtime: remotely abort tasks on `JoinHandle::abort` ([#3934])
1961
1962 [#3934]: https://github.com/tokio-rs/tokio/pull/3934
1963
1964 # 1.8.0 (July 2, 2021)
1965
1966 ### Added
1967
1968 - io: add `get_{ref,mut}` methods to `AsyncFdReadyGuard` and `AsyncFdReadyMutGuard` ([#3807])
1969 - io: efficient implementation of vectored writes for `BufWriter` ([#3163])
1970 - net: add ready/try methods to `NamedPipe{Client,Server}` ([#3866], [#3899])
1971 - sync: add `watch::Receiver::borrow_and_update` ([#3813])
1972 - sync: implement `From<T>` for `OnceCell<T>` ([#3877])
1973 - time: allow users to specify Interval behavior when delayed ([#3721])
1974
1975 ### Added (unstable)
1976
1977 - rt: add `tokio::task::Builder` ([#3881])
1978
1979 ### Fixed
1980
1981 - net: handle HUP event with `UnixStream` ([#3898])
1982
1983 ### Documented
1984
1985 - doc: document cancellation safety ([#3900])
1986 - time: add wait alias to sleep ([#3897])
1987 - time: document auto-advancing behavior of runtime ([#3763])
1988
1989 [#3163]: https://github.com/tokio-rs/tokio/pull/3163
1990 [#3721]: https://github.com/tokio-rs/tokio/pull/3721
1991 [#3763]: https://github.com/tokio-rs/tokio/pull/3763
1992 [#3807]: https://github.com/tokio-rs/tokio/pull/3807
1993 [#3813]: https://github.com/tokio-rs/tokio/pull/3813
1994 [#3866]: https://github.com/tokio-rs/tokio/pull/3866
1995 [#3877]: https://github.com/tokio-rs/tokio/pull/3877
1996 [#3881]: https://github.com/tokio-rs/tokio/pull/3881
1997 [#3897]: https://github.com/tokio-rs/tokio/pull/3897
1998 [#3898]: https://github.com/tokio-rs/tokio/pull/3898
1999 [#3899]: https://github.com/tokio-rs/tokio/pull/3899
2000 [#3900]: https://github.com/tokio-rs/tokio/pull/3900
2001
2002 # 1.7.2 (July 6, 2021)
2003
2004 Forward ports 1.5.1 fixes.
2005
2006 ### Fixed
2007
2008 - runtime: remotely abort tasks on `JoinHandle::abort` ([#3934])
2009
2010 [#3934]: https://github.com/tokio-rs/tokio/pull/3934
2011
2012 # 1.7.1 (June 18, 2021)
2013
2014 ### Fixed
2015
2016 - runtime: fix early task shutdown during runtime shutdown ([#3870])
2017
2018 [#3870]: https://github.com/tokio-rs/tokio/pull/3870
2019
2020 # 1.7.0 (June 15, 2021)
2021
2022 ### Added
2023
2024 - net: add named pipes on windows ([#3760])
2025 - net: add `TcpSocket` from `std::net::TcpStream` conversion ([#3838])
2026 - sync: add `receiver_count` to `watch::Sender` ([#3729])
2027 - sync: export `sync::notify::Notified` future publicly ([#3840])
2028 - tracing: instrument task wakers ([#3836])
2029
2030 ### Fixed
2031
2032 - macros: suppress `clippy::default_numeric_fallback` lint in generated code ([#3831])
2033 - runtime: immediately drop new tasks when runtime is shut down ([#3752])
2034 - sync: deprecate unused `mpsc::RecvError` type ([#3833])
2035
2036 ### Documented
2037
2038 - io: clarify EOF condition for `AsyncReadExt::read_buf` ([#3850])
2039 - io: clarify limits on return values of `AsyncWrite::poll_write` ([#3820])
2040 - sync: add examples to Semaphore ([#3808])
2041
2042 [#3729]: https://github.com/tokio-rs/tokio/pull/3729
2043 [#3752]: https://github.com/tokio-rs/tokio/pull/3752
2044 [#3760]: https://github.com/tokio-rs/tokio/pull/3760
2045 [#3808]: https://github.com/tokio-rs/tokio/pull/3808
2046 [#3820]: https://github.com/tokio-rs/tokio/pull/3820
2047 [#3831]: https://github.com/tokio-rs/tokio/pull/3831
2048 [#3833]: https://github.com/tokio-rs/tokio/pull/3833
2049 [#3836]: https://github.com/tokio-rs/tokio/pull/3836
2050 [#3838]: https://github.com/tokio-rs/tokio/pull/3838
2051 [#3840]: https://github.com/tokio-rs/tokio/pull/3840
2052 [#3850]: https://github.com/tokio-rs/tokio/pull/3850
2053
2054 # 1.6.3 (July 6, 2021)
2055
2056 Forward ports 1.5.1 fixes.
2057
2058 ### Fixed
2059
2060 - runtime: remotely abort tasks on `JoinHandle::abort` ([#3934])
2061
2062 [#3934]: https://github.com/tokio-rs/tokio/pull/3934
2063
2064 # 1.6.2 (June 14, 2021)
2065
2066 ### Fixes
2067
2068 - test: sub-ms `time:advance` regression introduced in 1.6 ([#3852])
2069
2070 [#3852]: https://github.com/tokio-rs/tokio/pull/3852
2071
2072 # 1.6.1 (May 28, 2021)
2073
2074 This release reverts [#3518] because it doesn't work on some kernels due to
2075 a kernel bug. ([#3803])
2076
2077 [#3518]: https://github.com/tokio-rs/tokio/issues/3518
2078 [#3803]: https://github.com/tokio-rs/tokio/issues/3803
2079
2080 # 1.6.0 (May 14, 2021)
2081
2082 ### Added
2083
2084 - fs: try doing a non-blocking read before punting to the threadpool ([#3518])
2085 - io: add `write_all_buf` to `AsyncWriteExt` ([#3737])
2086 - io: implement `AsyncSeek` for `BufReader`, `BufWriter`, and `BufStream` ([#3491])
2087 - net: support non-blocking vectored I/O ([#3761])
2088 - sync: add `mpsc::Sender::{reserve_owned, try_reserve_owned}` ([#3704])
2089 - sync: add a `MutexGuard::map` method that returns a `MappedMutexGuard` ([#2472])
2090 - time: add getter for Interval's period ([#3705])
2091
2092 ### Fixed
2093
2094 - io: wake pending writers on `DuplexStream` close ([#3756])
2095 - process: avoid redundant effort to reap orphan processes ([#3743])
2096 - signal: use `std::os::raw::c_int` instead of `libc::c_int` on public API ([#3774])
2097 - sync: preserve permit state in `notify_waiters` ([#3660])
2098 - task: update `JoinHandle` panic message ([#3727])
2099 - time: prevent `time::advance` from going too far ([#3712])
2100
2101 ### Documented
2102
2103 - net: hide `net::unix::datagram` module from docs ([#3775])
2104 - process: updated example ([#3748])
2105 - sync: `Barrier` doc should use task, not thread ([#3780])
2106 - task: update documentation on `block_in_place` ([#3753])
2107
2108 [#2472]: https://github.com/tokio-rs/tokio/pull/2472
2109 [#3491]: https://github.com/tokio-rs/tokio/pull/3491
2110 [#3518]: https://github.com/tokio-rs/tokio/pull/3518
2111 [#3660]: https://github.com/tokio-rs/tokio/pull/3660
2112 [#3704]: https://github.com/tokio-rs/tokio/pull/3704
2113 [#3705]: https://github.com/tokio-rs/tokio/pull/3705
2114 [#3712]: https://github.com/tokio-rs/tokio/pull/3712
2115 [#3727]: https://github.com/tokio-rs/tokio/pull/3727
2116 [#3737]: https://github.com/tokio-rs/tokio/pull/3737
2117 [#3743]: https://github.com/tokio-rs/tokio/pull/3743
2118 [#3748]: https://github.com/tokio-rs/tokio/pull/3748
2119 [#3753]: https://github.com/tokio-rs/tokio/pull/3753
2120 [#3756]: https://github.com/tokio-rs/tokio/pull/3756
2121 [#3761]: https://github.com/tokio-rs/tokio/pull/3761
2122 [#3774]: https://github.com/tokio-rs/tokio/pull/3774
2123 [#3775]: https://github.com/tokio-rs/tokio/pull/3775
2124 [#3780]: https://github.com/tokio-rs/tokio/pull/3780
2125
2126 # 1.5.1 (July 6, 2021)
2127
2128 ### Fixed
2129
2130 - runtime: remotely abort tasks on `JoinHandle::abort` ([#3934])
2131
2132 [#3934]: https://github.com/tokio-rs/tokio/pull/3934
2133
2134 # 1.5.0 (April 12, 2021)
2135
2136 ### Added
2137
2138 - io: add `AsyncSeekExt::stream_position` ([#3650])
2139 - io: add `AsyncWriteExt::write_vectored` ([#3678])
2140 - io: add a `copy_bidirectional` utility ([#3572])
2141 - net: implement `IntoRawFd` for `TcpSocket` ([#3684])
2142 - sync: add `OnceCell` ([#3591])
2143 - sync: add `OwnedRwLockReadGuard` and `OwnedRwLockWriteGuard` ([#3340])
2144 - sync: add `Semaphore::is_closed` ([#3673])
2145 - sync: add `mpsc::Sender::capacity` ([#3690])
2146 - sync: allow configuring `RwLock` max reads ([#3644])
2147 - task: add `sync_scope` for `LocalKey` ([#3612])
2148
2149 ### Fixed
2150
2151 - chore: try to avoid `noalias` attributes on intrusive linked list ([#3654])
2152 - rt: fix panic in `JoinHandle::abort()` when called from other threads ([#3672])
2153 - sync: don't panic in `oneshot::try_recv` ([#3674])
2154 - sync: fix notifications getting dropped on receiver drop ([#3652])
2155 - sync: fix `Semaphore` permit overflow calculation ([#3644])
2156
2157 ### Documented
2158
2159 - io: clarify requirements of `AsyncFd` ([#3635])
2160 - runtime: fix unclear docs for `{Handle,Runtime}::block_on` ([#3628])
2161 - sync: document that `Semaphore` is fair ([#3693])
2162 - sync: improve doc on blocking mutex ([#3645])
2163
2164 [#3340]: https://github.com/tokio-rs/tokio/pull/3340
2165 [#3572]: https://github.com/tokio-rs/tokio/pull/3572
2166 [#3591]: https://github.com/tokio-rs/tokio/pull/3591
2167 [#3612]: https://github.com/tokio-rs/tokio/pull/3612
2168 [#3628]: https://github.com/tokio-rs/tokio/pull/3628
2169 [#3635]: https://github.com/tokio-rs/tokio/pull/3635
2170 [#3644]: https://github.com/tokio-rs/tokio/pull/3644
2171 [#3645]: https://github.com/tokio-rs/tokio/pull/3645
2172 [#3650]: https://github.com/tokio-rs/tokio/pull/3650
2173 [#3652]: https://github.com/tokio-rs/tokio/pull/3652
2174 [#3654]: https://github.com/tokio-rs/tokio/pull/3654
2175 [#3672]: https://github.com/tokio-rs/tokio/pull/3672
2176 [#3673]: https://github.com/tokio-rs/tokio/pull/3673
2177 [#3674]: https://github.com/tokio-rs/tokio/pull/3674
2178 [#3678]: https://github.com/tokio-rs/tokio/pull/3678
2179 [#3684]: https://github.com/tokio-rs/tokio/pull/3684
2180 [#3690]: https://github.com/tokio-rs/tokio/pull/3690
2181 [#3693]: https://github.com/tokio-rs/tokio/pull/3693
2182
2183 # 1.4.0 (March 20, 2021)
2184
2185 ### Added
2186
2187 - macros: introduce biased argument for `select!` ([#3603])
2188 - runtime: add `Handle::block_on` ([#3569])
2189
2190 ### Fixed
2191
2192 - runtime: avoid unnecessary polling of `block_on` future ([#3582])
2193 - runtime: fix memory leak/growth when creating many runtimes ([#3564])
2194 - runtime: mark `EnterGuard` with `must_use` ([#3609])
2195
2196 ### Documented
2197
2198 - chore: mention fix for building docs in contributing guide ([#3618])
2199 - doc: add link to `PollSender` ([#3613])
2200 - doc: alias sleep to delay ([#3604])
2201 - sync: improve `Mutex` FIFO explanation ([#3615])
2202 - timer: fix double newline in module docs ([#3617])
2203
2204 [#3564]: https://github.com/tokio-rs/tokio/pull/3564
2205 [#3613]: https://github.com/tokio-rs/tokio/pull/3613
2206 [#3618]: https://github.com/tokio-rs/tokio/pull/3618
2207 [#3617]: https://github.com/tokio-rs/tokio/pull/3617
2208 [#3582]: https://github.com/tokio-rs/tokio/pull/3582
2209 [#3615]: https://github.com/tokio-rs/tokio/pull/3615
2210 [#3603]: https://github.com/tokio-rs/tokio/pull/3603
2211 [#3609]: https://github.com/tokio-rs/tokio/pull/3609
2212 [#3604]: https://github.com/tokio-rs/tokio/pull/3604
2213 [#3569]: https://github.com/tokio-rs/tokio/pull/3569
2214
2215 # 1.3.0 (March 9, 2021)
2216
2217 ### Added
2218
2219 - coop: expose an `unconstrained()` opt-out ([#3547])
2220 - net: add `into_std` for net types without it ([#3509])
2221 - sync: add `same_channel` method to `mpsc::Sender` ([#3532])
2222 - sync: add `{try_,}acquire_many_owned` to `Semaphore` ([#3535])
2223 - sync: add back `RwLockWriteGuard::map` and `RwLockWriteGuard::try_map` ([#3348])
2224
2225 ### Fixed
2226
2227 - sync: allow `oneshot::Receiver::close` after successful `try_recv` ([#3552])
2228 - time: do not panic on `timeout(Duration::MAX)` ([#3551])
2229
2230 ### Documented
2231
2232 - doc: doc aliases for pre-1.0 function names ([#3523])
2233 - io: fix typos ([#3541])
2234 - io: note the EOF behavior of `read_until` ([#3536])
2235 - io: update `AsyncRead::poll_read` doc ([#3557])
2236 - net: update `UdpSocket` splitting doc ([#3517])
2237 - runtime: add link to `LocalSet` on `new_current_thread` ([#3508])
2238 - runtime: update documentation of thread limits ([#3527])
2239 - sync: do not recommend `join_all` for `Barrier` ([#3514])
2240 - sync: documentation for `oneshot` ([#3592])
2241 - sync: rename `notify` to `notify_one` ([#3526])
2242 - time: fix typo in `Sleep` doc ([#3515])
2243 - time: sync `interval.rs` and `time/mod.rs` docs ([#3533])
2244
2245 [#3348]: https://github.com/tokio-rs/tokio/pull/3348
2246 [#3508]: https://github.com/tokio-rs/tokio/pull/3508
2247 [#3509]: https://github.com/tokio-rs/tokio/pull/3509
2248 [#3514]: https://github.com/tokio-rs/tokio/pull/3514
2249 [#3515]: https://github.com/tokio-rs/tokio/pull/3515
2250 [#3517]: https://github.com/tokio-rs/tokio/pull/3517
2251 [#3523]: https://github.com/tokio-rs/tokio/pull/3523
2252 [#3526]: https://github.com/tokio-rs/tokio/pull/3526
2253 [#3527]: https://github.com/tokio-rs/tokio/pull/3527
2254 [#3532]: https://github.com/tokio-rs/tokio/pull/3532
2255 [#3533]: https://github.com/tokio-rs/tokio/pull/3533
2256 [#3535]: https://github.com/tokio-rs/tokio/pull/3535
2257 [#3536]: https://github.com/tokio-rs/tokio/pull/3536
2258 [#3541]: https://github.com/tokio-rs/tokio/pull/3541
2259 [#3547]: https://github.com/tokio-rs/tokio/pull/3547
2260 [#3551]: https://github.com/tokio-rs/tokio/pull/3551
2261 [#3552]: https://github.com/tokio-rs/tokio/pull/3552
2262 [#3557]: https://github.com/tokio-rs/tokio/pull/3557
2263 [#3592]: https://github.com/tokio-rs/tokio/pull/3592
2264
2265 # 1.2.0 (February 5, 2021)
2266
2267 ### Added
2268
2269 - signal: make `Signal::poll_recv` method public ([#3383])
2270
2271 ### Fixed
2272
2273 - time: make `test-util` paused time fully deterministic ([#3492])
2274
2275 ### Documented
2276
2277 - sync: link to new broadcast and watch wrappers ([#3504])
2278
2279 [#3383]: https://github.com/tokio-rs/tokio/pull/3383
2280 [#3492]: https://github.com/tokio-rs/tokio/pull/3492
2281 [#3504]: https://github.com/tokio-rs/tokio/pull/3504
2282
2283 # 1.1.1 (January 29, 2021)
2284
2285 Forward ports 1.0.3 fix.
2286
2287 ### Fixed
2288 - io: memory leak during shutdown ([#3477]).
2289
2290 # 1.1.0 (January 22, 2021)
2291
2292 ### Added
2293
2294 - net: add `try_read_buf` and `try_recv_buf` ([#3351])
2295 - mpsc: Add `Sender::try_reserve` function ([#3418])
2296 - sync: add `RwLock` `try_read` and `try_write` methods ([#3400])
2297 - io: add `ReadBuf::inner_mut` ([#3443])
2298
2299 ### Changed
2300
2301 - macros: improve `select!` error message ([#3352])
2302 - io: keep track of initialized bytes in `read_to_end` ([#3426])
2303 - runtime: consolidate errors for context missing ([#3441])
2304
2305 ### Fixed
2306
2307 - task: wake `LocalSet` on `spawn_local` ([#3369])
2308 - sync: fix panic in broadcast::Receiver drop ([#3434])
2309
2310 ### Documented
2311 - stream: link to new `Stream` wrappers in `tokio-stream` ([#3343])
2312 - docs: mention that `test-util` feature is not enabled with full ([#3397])
2313 - process: add documentation to process::Child fields ([#3437])
2314 - io: clarify `AsyncFd` docs about changes of the inner fd ([#3430])
2315 - net: update datagram docs on splitting ([#3448])
2316 - time: document that `Sleep` is not `Unpin` ([#3457])
2317 - sync: add link to `PollSemaphore` ([#3456])
2318 - task: add `LocalSet` example ([#3438])
2319 - sync: improve bounded `mpsc` documentation ([#3458])
2320
2321 [#3343]: https://github.com/tokio-rs/tokio/pull/3343
2322 [#3351]: https://github.com/tokio-rs/tokio/pull/3351
2323 [#3352]: https://github.com/tokio-rs/tokio/pull/3352
2324 [#3369]: https://github.com/tokio-rs/tokio/pull/3369
2325 [#3397]: https://github.com/tokio-rs/tokio/pull/3397
2326 [#3400]: https://github.com/tokio-rs/tokio/pull/3400
2327 [#3418]: https://github.com/tokio-rs/tokio/pull/3418
2328 [#3426]: https://github.com/tokio-rs/tokio/pull/3426
2329 [#3430]: https://github.com/tokio-rs/tokio/pull/3430
2330 [#3434]: https://github.com/tokio-rs/tokio/pull/3434
2331 [#3437]: https://github.com/tokio-rs/tokio/pull/3437
2332 [#3438]: https://github.com/tokio-rs/tokio/pull/3438
2333 [#3441]: https://github.com/tokio-rs/tokio/pull/3441
2334 [#3443]: https://github.com/tokio-rs/tokio/pull/3443
2335 [#3448]: https://github.com/tokio-rs/tokio/pull/3448
2336 [#3456]: https://github.com/tokio-rs/tokio/pull/3456
2337 [#3457]: https://github.com/tokio-rs/tokio/pull/3457
2338 [#3458]: https://github.com/tokio-rs/tokio/pull/3458
2339
2340 # 1.0.3 (January 28, 2021)
2341
2342 ### Fixed
2343 - io: memory leak during shutdown ([#3477]).
2344
2345 [#3477]: https://github.com/tokio-rs/tokio/pull/3477
2346
2347 # 1.0.2 (January 14, 2021)
2348
2349 ### Fixed
2350 - io: soundness in `read_to_end` ([#3428]).
2351
2352 [#3428]: https://github.com/tokio-rs/tokio/pull/3428
2353
2354 # 1.0.1 (December 25, 2020)
2355
2356 This release fixes a soundness hole caused by the combination of `RwLockWriteGuard::map`
2357 and `RwLockWriteGuard::downgrade` by removing the `map` function. This is a breaking
2358 change, but breaking changes are allowed under our semver policy when they are required
2359 to fix a soundness hole. (See [this RFC][semver] for more.)
2360
2361 Note that we have chosen not to do a deprecation cycle or similar because Tokio 1.0.0 was
2362 released two days ago, and therefore the impact should be minimal.
2363
2364 Due to the soundness hole, we have also yanked Tokio version 1.0.0.
2365
2366 ### Removed
2367
2368 - sync: remove `RwLockWriteGuard::map` and `RwLockWriteGuard::try_map` ([#3345])
2369
2370 ### Fixed
2371
2372 - docs: remove stream feature from docs ([#3335])
2373
2374 [semver]: https://github.com/rust-lang/rfcs/blob/master/text/1122-language-semver.md#soundness-changes
2375 [#3335]: https://github.com/tokio-rs/tokio/pull/3335
2376 [#3345]: https://github.com/tokio-rs/tokio/pull/3345
2377
2378 # 1.0.0 (December 23, 2020)
2379
2380 Commit to the API and long-term support.
2381
2382 ### Fixed
2383
2384 - sync: spurious wakeup in `watch` ([#3234]).
2385
2386 ### Changed
2387
2388 - io: rename `AsyncFd::with_io()` to `try_io()` ([#3306])
2389 - fs: avoid OS specific `*Ext` traits in favor of conditionally defining the fn ([#3264]).
2390 - fs: `Sleep` is `!Unpin` ([#3278]).
2391 - net: pass `SocketAddr` by value ([#3125]).
2392 - net: `TcpStream::poll_peek` takes `ReadBuf` ([#3259]).
2393 - rt: rename `runtime::Builder::max_threads()` to `max_blocking_threads()` ([#3287]).
2394 - time: require `current_thread` runtime when calling `time::pause()` ([#3289]).
2395
2396 ### Removed
2397
2398 - remove `tokio::prelude` ([#3299]).
2399 - io: remove `AsyncFd::with_poll()` ([#3306]).
2400 - net: remove `{Tcp,Unix}Stream::shutdown()` in favor of `AsyncWrite::shutdown()` ([#3298]).
2401 - stream: move all stream utilities to `tokio-stream` until `Stream` is added to
2402 `std` ([#3277]).
2403 - sync: mpsc `try_recv()` due to unexpected behavior ([#3263]).
2404 - tracing: make unstable as `tracing-core` is not 1.0 yet ([#3266]).
2405
2406 ### Added
2407
2408 - fs: `poll_*` fns to `DirEntry` ([#3308]).
2409 - io: `poll_*` fns to `io::Lines`, `io::Split` ([#3308]).
2410 - io: `_mut` method variants to `AsyncFd` ([#3304]).
2411 - net: `poll_*` fns to `UnixDatagram` ([#3223]).
2412 - net: `UnixStream` readiness and non-blocking ops ([#3246]).
2413 - sync: `UnboundedReceiver::blocking_recv()` ([#3262]).
2414 - sync: `watch::Sender::borrow()` ([#3269]).
2415 - sync: `Semaphore::close()` ([#3065]).
2416 - sync: `poll_recv` fns to `mpsc::Receiver`, `mpsc::UnboundedReceiver` ([#3308]).
2417 - time: `poll_tick` fn to `time::Interval` ([#3316]).
2418
2419 [#3065]: https://github.com/tokio-rs/tokio/pull/3065
2420 [#3125]: https://github.com/tokio-rs/tokio/pull/3125
2421 [#3223]: https://github.com/tokio-rs/tokio/pull/3223
2422 [#3234]: https://github.com/tokio-rs/tokio/pull/3234
2423 [#3246]: https://github.com/tokio-rs/tokio/pull/3246
2424 [#3259]: https://github.com/tokio-rs/tokio/pull/3259
2425 [#3262]: https://github.com/tokio-rs/tokio/pull/3262
2426 [#3263]: https://github.com/tokio-rs/tokio/pull/3263
2427 [#3264]: https://github.com/tokio-rs/tokio/pull/3264
2428 [#3266]: https://github.com/tokio-rs/tokio/pull/3266
2429 [#3269]: https://github.com/tokio-rs/tokio/pull/3269
2430 [#3277]: https://github.com/tokio-rs/tokio/pull/3277
2431 [#3278]: https://github.com/tokio-rs/tokio/pull/3278
2432 [#3287]: https://github.com/tokio-rs/tokio/pull/3287
2433 [#3289]: https://github.com/tokio-rs/tokio/pull/3289
2434 [#3298]: https://github.com/tokio-rs/tokio/pull/3298
2435 [#3299]: https://github.com/tokio-rs/tokio/pull/3299
2436 [#3304]: https://github.com/tokio-rs/tokio/pull/3304
2437 [#3306]: https://github.com/tokio-rs/tokio/pull/3306
2438 [#3308]: https://github.com/tokio-rs/tokio/pull/3308
2439 [#3316]: https://github.com/tokio-rs/tokio/pull/3316
2440
2441 # 0.3.6 (December 14, 2020)
2442
2443 ### Fixed
2444
2445 - rt: fix deadlock in shutdown ([#3228])
2446 - rt: fix panic in task abort when off rt ([#3159])
2447 - sync: make `add_permits` panic with usize::MAX >> 3 permits ([#3188])
2448 - time: Fix race condition in timer drop ([#3229])
2449 - watch: fix spurious wakeup ([#3244])
2450
2451 ### Added
2452
2453 - example: add back udp-codec example ([#3205])
2454 - net: add `TcpStream::into_std` ([#3189])
2455
2456 [#3159]: https://github.com/tokio-rs/tokio/pull/3159
2457 [#3188]: https://github.com/tokio-rs/tokio/pull/3188
2458 [#3189]: https://github.com/tokio-rs/tokio/pull/3189
2459 [#3205]: https://github.com/tokio-rs/tokio/pull/3205
2460 [#3228]: https://github.com/tokio-rs/tokio/pull/3228
2461 [#3229]: https://github.com/tokio-rs/tokio/pull/3229
2462 [#3244]: https://github.com/tokio-rs/tokio/pull/3244
2463
2464 # 0.3.5 (November 30, 2020)
2465
2466 ### Fixed
2467
2468 - rt: fix `shutdown_timeout(0)` ([#3196]).
2469 - time: fixed race condition with small sleeps ([#3069]).
2470
2471 ### Added
2472
2473 - io: `AsyncFd::with_interest()` ([#3167]).
2474 - signal: `CtrlC` stream on windows ([#3186]).
2475
2476 [#3069]: https://github.com/tokio-rs/tokio/pull/3069
2477 [#3167]: https://github.com/tokio-rs/tokio/pull/3167
2478 [#3186]: https://github.com/tokio-rs/tokio/pull/3186
2479 [#3196]: https://github.com/tokio-rs/tokio/pull/3196
2480
2481 # 0.3.4 (November 18, 2020)
2482
2483 ### Fixed
2484
2485 - stream: `StreamMap` `Default` impl bound ([#3093]).
2486 - io: `AsyncFd::into_inner()` should deregister the FD ([#3104]).
2487
2488 ### Changed
2489
2490 - meta: `parking_lot` feature enabled with `full` ([#3119]).
2491
2492 ### Added
2493
2494 - io: `AsyncWrite` vectored writes ([#3149]).
2495 - net: TCP/UDP readiness and non-blocking ops ([#3130], [#2743], [#3138]).
2496 - net: TCP socket option (linger, send/recv buf size) ([#3145], [#3143]).
2497 - net: PID field in `UCred` with solaris/illumos ([#3085]).
2498 - rt: `runtime::Handle` allows spawning onto a runtime ([#3079]).
2499 - sync: `Notify::notify_waiters()` ([#3098]).
2500 - sync: `acquire_many()`, `try_acquire_many()` to `Semaphore` ([#3067]).
2501
2502 [#2743]: https://github.com/tokio-rs/tokio/pull/2743
2503 [#3067]: https://github.com/tokio-rs/tokio/pull/3067
2504 [#3079]: https://github.com/tokio-rs/tokio/pull/3079
2505 [#3085]: https://github.com/tokio-rs/tokio/pull/3085
2506 [#3093]: https://github.com/tokio-rs/tokio/pull/3093
2507 [#3098]: https://github.com/tokio-rs/tokio/pull/3098
2508 [#3104]: https://github.com/tokio-rs/tokio/pull/3104
2509 [#3119]: https://github.com/tokio-rs/tokio/pull/3119
2510 [#3130]: https://github.com/tokio-rs/tokio/pull/3130
2511 [#3138]: https://github.com/tokio-rs/tokio/pull/3138
2512 [#3143]: https://github.com/tokio-rs/tokio/pull/3143
2513 [#3145]: https://github.com/tokio-rs/tokio/pull/3145
2514 [#3149]: https://github.com/tokio-rs/tokio/pull/3149
2515
2516 # 0.3.3 (November 2, 2020)
2517
2518 Fixes a soundness hole by adding a missing `Send` bound to
2519 `Runtime::spawn_blocking()`.
2520
2521 ### Fixed
2522
2523 - rt: include missing `Send`, fixing soundness hole ([#3089]).
2524 - tracing: avoid huge trace span names ([#3074]).
2525
2526 ### Added
2527
2528 - net: `TcpSocket::reuseport()`, `TcpSocket::set_reuseport()` ([#3083]).
2529 - net: `TcpSocket::reuseaddr()` ([#3093]).
2530 - net: `TcpSocket::local_addr()` ([#3093]).
2531 - net: add pid to `UCred` ([#2633]).
2532
2533 [#2633]: https://github.com/tokio-rs/tokio/pull/2633
2534 [#3074]: https://github.com/tokio-rs/tokio/pull/3074
2535 [#3083]: https://github.com/tokio-rs/tokio/pull/3083
2536 [#3089]: https://github.com/tokio-rs/tokio/pull/3089
2537 [#3093]: https://github.com/tokio-rs/tokio/pull/3093
2538
2539 # 0.3.2 (October 27, 2020)
2540
2541 Adds `AsyncFd` as a replacement for v0.2's `PollEvented`.
2542
2543 ### Fixed
2544
2545 - io: fix a potential deadlock when shutting down the I/O driver ([#2903]).
2546 - sync: `RwLockWriteGuard::downgrade()` bug ([#2957]).
2547
2548 ### Added
2549
2550 - io: `AsyncFd` for receiving readiness events on raw FDs ([#2903]).
2551 - net: `poll_*` function on `UdpSocket` ([#2981]).
2552 - net: `UdpSocket::take_error()` ([#3051]).
2553 - sync: `oneshot::Sender::poll_closed()` ([#3032]).
2554
2555 [#2903]: https://github.com/tokio-rs/tokio/pull/2903
2556 [#2957]: https://github.com/tokio-rs/tokio/pull/2957
2557 [#2981]: https://github.com/tokio-rs/tokio/pull/2981
2558 [#3032]: https://github.com/tokio-rs/tokio/pull/3032
2559 [#3051]: https://github.com/tokio-rs/tokio/pull/3051
2560
2561 # 0.3.1 (October 21, 2020)
2562
2563 This release fixes an use-after-free in the IO driver. Additionally, the `read_buf`
2564 and `write_buf` methods have been added back to the IO traits, as the bytes crate
2565 is now on track to reach version 1.0 together with Tokio.
2566
2567 ### Fixed
2568
2569 - net: fix use-after-free ([#3019]).
2570 - fs: ensure buffered data is written on shutdown ([#3009]).
2571
2572 ### Added
2573
2574 - io: `copy_buf()` ([#2884]).
2575 - io: `AsyncReadExt::read_buf()`, `AsyncReadExt::write_buf()` for working with
2576 `Buf`/`BufMut` ([#3003]).
2577 - rt: `Runtime::spawn_blocking()` ([#2980]).
2578 - sync: `watch::Sender::is_closed()` ([#2991]).
2579
2580 [#2884]: https://github.com/tokio-rs/tokio/pull/2884
2581 [#2980]: https://github.com/tokio-rs/tokio/pull/2980
2582 [#2991]: https://github.com/tokio-rs/tokio/pull/2991
2583 [#3003]: https://github.com/tokio-rs/tokio/pull/3003
2584 [#3009]: https://github.com/tokio-rs/tokio/pull/3009
2585 [#3019]: https://github.com/tokio-rs/tokio/pull/3019
2586
2587 # 0.3.0 (October 15, 2020)
2588
2589 This represents a 1.0 beta release. APIs are polished and future-proofed. APIs
2590 not included for 1.0 stabilization have been removed.
2591
2592 Biggest changes are:
2593
2594 - I/O driver internal rewrite. The windows implementation includes significant
2595 changes.
2596 - Runtime API is polished, especially with how it interacts with feature flag
2597 combinations.
2598 - Feature flags are simplified
2599 - `rt-core` and `rt-util` are combined to `rt`
2600 - `rt-threaded` is renamed to `rt-multi-thread` to match builder API
2601 - `tcp`, `udp`, `uds`, `dns` are combined to `net`.
2602 - `parking_lot` is included with `full`
2603
2604 ### Changes
2605
2606 - meta: Minimum supported Rust version is now 1.45.
2607 - io: `AsyncRead` trait now takes `ReadBuf` in order to safely handle reading
2608 into uninitialized memory ([#2758]).
2609 - io: Internal I/O driver storage is now able to compact ([#2757]).
2610 - rt: `Runtime::block_on` now takes `&self` ([#2782]).
2611 - sync: `watch` reworked to decouple receiving a change notification from
2612 receiving the value ([#2814], [#2806]).
2613 - sync: `Notify::notify` is renamed to `notify_one` ([#2822]).
2614 - process: `Child::kill` is now an `async fn` that cleans zombies ([#2823]).
2615 - sync: use `const fn` constructors as possible ([#2833], [#2790])
2616 - signal: reduce cross-thread notification ([#2835]).
2617 - net: tcp,udp,uds types support operations with `&self` ([#2828], [#2919], [#2934]).
2618 - sync: blocking `mpsc` channel supports `send` with `&self` ([#2861]).
2619 - time: rename `delay_for` and `delay_until` to `sleep` and `sleep_until` ([#2826]).
2620 - io: upgrade to `mio` 0.7 ([#2893]).
2621 - io: `AsyncSeek` trait is tweaked ([#2885]).
2622 - fs: `File` operations take `&self` ([#2930]).
2623 - rt: runtime API, and `#[tokio::main]` macro polish ([#2876])
2624 - rt: `Runtime::enter` uses an RAII guard instead of a closure ([#2954]).
2625 - net: the `from_std` function on all sockets no longer sets socket into non-blocking mode ([#2893])
2626
2627 ### Added
2628
2629 - sync: `map` function to lock guards ([#2445]).
2630 - sync: `blocking_recv` and `blocking_send` fns to `mpsc` for use outside of Tokio ([#2685]).
2631 - rt: `Builder::thread_name_fn` for configuring thread names ([#1921]).
2632 - fs: impl `FromRawFd` and `FromRawHandle` for `File` ([#2792]).
2633 - process: `Child::wait` and `Child::try_wait` ([#2796]).
2634 - rt: support configuring thread keep-alive duration ([#2809]).
2635 - rt: `task::JoinHandle::abort` forcibly cancels a spawned task ([#2474]).
2636 - sync: `RwLock` write guard to read guard downgrading ([#2733]).
2637 - net: add `poll_*` functions that take `&self` to all net types ([#2845])
2638 - sync: `get_mut()` for `Mutex`, `RwLock` ([#2856]).
2639 - sync: `mpsc::Sender::closed()` waits for `Receiver` half to close ([#2840]).
2640 - sync: `mpsc::Sender::is_closed()` returns true if `Receiver` half is closed ([#2726]).
2641 - stream: `iter` and `iter_mut` to `StreamMap` ([#2890]).
2642 - net: implement `AsRawSocket` on windows ([#2911]).
2643 - net: `TcpSocket` creates a socket without binding or listening ([#2920]).
2644
2645 ### Removed
2646
2647 - io: vectored ops are removed from `AsyncRead`, `AsyncWrite` traits ([#2882]).
2648 - io: `mio` is removed from the public API. `PollEvented` and` Registration` are
2649 removed ([#2893]).
2650 - io: remove `bytes` from public API. `Buf` and `BufMut` implementation are
2651 removed ([#2908]).
2652 - time: `DelayQueue` is moved to `tokio-util` ([#2897]).
2653
2654 ### Fixed
2655
2656 - io: `stdout` and `stderr` buffering on windows ([#2734]).
2657
2658 [#1921]: https://github.com/tokio-rs/tokio/pull/1921
2659 [#2445]: https://github.com/tokio-rs/tokio/pull/2445
2660 [#2474]: https://github.com/tokio-rs/tokio/pull/2474
2661 [#2685]: https://github.com/tokio-rs/tokio/pull/2685
2662 [#2726]: https://github.com/tokio-rs/tokio/pull/2726
2663 [#2733]: https://github.com/tokio-rs/tokio/pull/2733
2664 [#2734]: https://github.com/tokio-rs/tokio/pull/2734
2665 [#2757]: https://github.com/tokio-rs/tokio/pull/2757
2666 [#2758]: https://github.com/tokio-rs/tokio/pull/2758
2667 [#2782]: https://github.com/tokio-rs/tokio/pull/2782
2668 [#2790]: https://github.com/tokio-rs/tokio/pull/2790
2669 [#2792]: https://github.com/tokio-rs/tokio/pull/2792
2670 [#2796]: https://github.com/tokio-rs/tokio/pull/2796
2671 [#2806]: https://github.com/tokio-rs/tokio/pull/2806
2672 [#2809]: https://github.com/tokio-rs/tokio/pull/2809
2673 [#2814]: https://github.com/tokio-rs/tokio/pull/2814
2674 [#2822]: https://github.com/tokio-rs/tokio/pull/2822
2675 [#2823]: https://github.com/tokio-rs/tokio/pull/2823
2676 [#2826]: https://github.com/tokio-rs/tokio/pull/2826
2677 [#2828]: https://github.com/tokio-rs/tokio/pull/2828
2678 [#2833]: https://github.com/tokio-rs/tokio/pull/2833
2679 [#2835]: https://github.com/tokio-rs/tokio/pull/2835
2680 [#2840]: https://github.com/tokio-rs/tokio/pull/2840
2681 [#2845]: https://github.com/tokio-rs/tokio/pull/2845
2682 [#2856]: https://github.com/tokio-rs/tokio/pull/2856
2683 [#2861]: https://github.com/tokio-rs/tokio/pull/2861
2684 [#2876]: https://github.com/tokio-rs/tokio/pull/2876
2685 [#2882]: https://github.com/tokio-rs/tokio/pull/2882
2686 [#2885]: https://github.com/tokio-rs/tokio/pull/2885
2687 [#2890]: https://github.com/tokio-rs/tokio/pull/2890
2688 [#2893]: https://github.com/tokio-rs/tokio/pull/2893
2689 [#2897]: https://github.com/tokio-rs/tokio/pull/2897
2690 [#2908]: https://github.com/tokio-rs/tokio/pull/2908
2691 [#2911]: https://github.com/tokio-rs/tokio/pull/2911
2692 [#2919]: https://github.com/tokio-rs/tokio/pull/2919
2693 [#2920]: https://github.com/tokio-rs/tokio/pull/2920
2694 [#2930]: https://github.com/tokio-rs/tokio/pull/2930
2695 [#2934]: https://github.com/tokio-rs/tokio/pull/2934
2696 [#2954]: https://github.com/tokio-rs/tokio/pull/2954
2697
2698 # 0.2.22 (July 21, 2020)
2699
2700 ### Fixes
2701
2702 - docs: misc improvements ([#2572], [#2658], [#2663], [#2656], [#2647], [#2630], [#2487], [#2621],
2703 [#2624], [#2600], [#2623], [#2622], [#2577], [#2569], [#2589], [#2575], [#2540], [#2564], [#2567],
2704 [#2520], [#2521], [#2493])
2705 - rt: allow calls to `block_on` inside calls to `block_in_place` that are
2706 themselves inside `block_on` ([#2645])
2707 - net: fix non-portable behavior when dropping `TcpStream` `OwnedWriteHalf` ([#2597])
2708 - io: improve stack usage by allocating large buffers on directly on the heap
2709 ([#2634])
2710 - io: fix unsound pin projection in `AsyncReadExt::read_buf` and
2711 `AsyncWriteExt::write_buf` ([#2612])
2712 - io: fix unnecessary zeroing for `AsyncRead` implementors ([#2525])
2713 - io: Fix `BufReader` not correctly forwarding `poll_write_buf` ([#2654])
2714 - io: fix panic in `AsyncReadExt::read_line` ([#2541])
2715
2716 ### Changes
2717
2718 - coop: returning `Poll::Pending` no longer decrements the task budget ([#2549])
2719
2720 ### Added
2721
2722 - io: little-endian variants of `AsyncReadExt` and `AsyncWriteExt` methods
2723 ([#1915])
2724 - task: add [`tracing`] instrumentation to spawned tasks ([#2655])
2725 - sync: allow unsized types in `Mutex` and `RwLock` (via `default` constructors)
2726 ([#2615])
2727 - net: add `ToSocketAddrs` implementation for `&[SocketAddr]` ([#2604])
2728 - fs: add `OpenOptionsExt` for `OpenOptions` ([#2515])
2729 - fs: add `DirBuilder` ([#2524])
2730
2731 [`tracing`]: https://crates.io/crates/tracing
2732 [#1915]: https://github.com/tokio-rs/tokio/pull/1915
2733 [#2487]: https://github.com/tokio-rs/tokio/pull/2487
2734 [#2493]: https://github.com/tokio-rs/tokio/pull/2493
2735 [#2515]: https://github.com/tokio-rs/tokio/pull/2515
2736 [#2520]: https://github.com/tokio-rs/tokio/pull/2520
2737 [#2521]: https://github.com/tokio-rs/tokio/pull/2521
2738 [#2524]: https://github.com/tokio-rs/tokio/pull/2524
2739 [#2525]: https://github.com/tokio-rs/tokio/pull/2525
2740 [#2540]: https://github.com/tokio-rs/tokio/pull/2540
2741 [#2541]: https://github.com/tokio-rs/tokio/pull/2541
2742 [#2549]: https://github.com/tokio-rs/tokio/pull/2549
2743 [#2564]: https://github.com/tokio-rs/tokio/pull/2564
2744 [#2567]: https://github.com/tokio-rs/tokio/pull/2567
2745 [#2569]: https://github.com/tokio-rs/tokio/pull/2569
2746 [#2572]: https://github.com/tokio-rs/tokio/pull/2572
2747 [#2575]: https://github.com/tokio-rs/tokio/pull/2575
2748 [#2577]: https://github.com/tokio-rs/tokio/pull/2577
2749 [#2589]: https://github.com/tokio-rs/tokio/pull/2589
2750 [#2597]: https://github.com/tokio-rs/tokio/pull/2597
2751 [#2600]: https://github.com/tokio-rs/tokio/pull/2600
2752 [#2604]: https://github.com/tokio-rs/tokio/pull/2604
2753 [#2612]: https://github.com/tokio-rs/tokio/pull/2612
2754 [#2615]: https://github.com/tokio-rs/tokio/pull/2615
2755 [#2621]: https://github.com/tokio-rs/tokio/pull/2621
2756 [#2622]: https://github.com/tokio-rs/tokio/pull/2622
2757 [#2623]: https://github.com/tokio-rs/tokio/pull/2623
2758 [#2624]: https://github.com/tokio-rs/tokio/pull/2624
2759 [#2630]: https://github.com/tokio-rs/tokio/pull/2630
2760 [#2634]: https://github.com/tokio-rs/tokio/pull/2634
2761 [#2645]: https://github.com/tokio-rs/tokio/pull/2645
2762 [#2647]: https://github.com/tokio-rs/tokio/pull/2647
2763 [#2654]: https://github.com/tokio-rs/tokio/pull/2654
2764 [#2655]: https://github.com/tokio-rs/tokio/pull/2655
2765 [#2656]: https://github.com/tokio-rs/tokio/pull/2656
2766 [#2658]: https://github.com/tokio-rs/tokio/pull/2658
2767 [#2663]: https://github.com/tokio-rs/tokio/pull/2663
2768
2769 # 0.2.21 (May 13, 2020)
2770
2771 ### Fixes
2772
2773 - macros: disambiguate built-in `#[test]` attribute in macro expansion ([#2503])
2774 - rt: `LocalSet` and task budgeting ([#2462]).
2775 - rt: task budgeting with `block_in_place` ([#2502]).
2776 - sync: release `broadcast` channel memory without sending a value ([#2509]).
2777 - time: notify when resetting a `Delay` to a time in the past ([#2290])
2778
2779 ### Added
2780
2781 - io: `get_mut`, `get_ref`, and `into_inner` to `Lines` ([#2450]).
2782 - io: `mio::Ready` argument to `PollEvented` ([#2419]).
2783 - os: illumos support ([#2486]).
2784 - rt: `Handle::spawn_blocking` ([#2501]).
2785 - sync: `OwnedMutexGuard` for `Arc<Mutex<T>>` ([#2455]).
2786
2787 [#2290]: https://github.com/tokio-rs/tokio/pull/2290
2788 [#2419]: https://github.com/tokio-rs/tokio/pull/2419
2789 [#2450]: https://github.com/tokio-rs/tokio/pull/2450
2790 [#2455]: https://github.com/tokio-rs/tokio/pull/2455
2791 [#2462]: https://github.com/tokio-rs/tokio/pull/2462
2792 [#2486]: https://github.com/tokio-rs/tokio/pull/2486
2793 [#2501]: https://github.com/tokio-rs/tokio/pull/2501
2794 [#2502]: https://github.com/tokio-rs/tokio/pull/2502
2795 [#2503]: https://github.com/tokio-rs/tokio/pull/2503
2796 [#2509]: https://github.com/tokio-rs/tokio/pull/2509
2797
2798 # 0.2.20 (April 28, 2020)
2799
2800 ### Fixes
2801
2802 - sync: `broadcast` closing the channel no longer requires capacity ([#2448]).
2803 - rt: regression when configuring runtime with `max_threads` less than number of CPUs ([#2457]).
2804
2805 [#2448]: https://github.com/tokio-rs/tokio/pull/2448
2806 [#2457]: https://github.com/tokio-rs/tokio/pull/2457
2807
2808 # 0.2.19 (April 24, 2020)
2809
2810 ### Fixes
2811
2812 - docs: misc improvements ([#2400], [#2405], [#2414], [#2420], [#2423], [#2426], [#2427], [#2434], [#2436], [#2440]).
2813 - rt: support `block_in_place` in more contexts ([#2409], [#2410]).
2814 - stream: no panic in `merge()` and `chain()` when using `size_hint()` ([#2430]).
2815 - task: include visibility modifier when defining a task-local ([#2416]).
2816
2817 ### Added
2818
2819 - rt: `runtime::Handle::block_on` ([#2437]).
2820 - sync: owned `Semaphore` permit ([#2421]).
2821 - tcp: owned split ([#2270]).
2822
2823 [#2270]: https://github.com/tokio-rs/tokio/pull/2270
2824 [#2400]: https://github.com/tokio-rs/tokio/pull/2400
2825 [#2405]: https://github.com/tokio-rs/tokio/pull/2405
2826 [#2409]: https://github.com/tokio-rs/tokio/pull/2409
2827 [#2410]: https://github.com/tokio-rs/tokio/pull/2410
2828 [#2414]: https://github.com/tokio-rs/tokio/pull/2414
2829 [#2416]: https://github.com/tokio-rs/tokio/pull/2416
2830 [#2420]: https://github.com/tokio-rs/tokio/pull/2420
2831 [#2421]: https://github.com/tokio-rs/tokio/pull/2421
2832 [#2423]: https://github.com/tokio-rs/tokio/pull/2423
2833 [#2426]: https://github.com/tokio-rs/tokio/pull/2426
2834 [#2427]: https://github.com/tokio-rs/tokio/pull/2427
2835 [#2430]: https://github.com/tokio-rs/tokio/pull/2430
2836 [#2434]: https://github.com/tokio-rs/tokio/pull/2434
2837 [#2436]: https://github.com/tokio-rs/tokio/pull/2436
2838 [#2437]: https://github.com/tokio-rs/tokio/pull/2437
2839 [#2440]: https://github.com/tokio-rs/tokio/pull/2440
2840
2841 # 0.2.18 (April 12, 2020)
2842
2843 ### Fixes
2844
2845 - task: `LocalSet` was incorrectly marked as `Send` ([#2398])
2846 - io: correctly report `WriteZero` failure in `write_int` ([#2334])
2847
2848 [#2334]: https://github.com/tokio-rs/tokio/pull/2334
2849 [#2398]: https://github.com/tokio-rs/tokio/pull/2398
2850
2851 # 0.2.17 (April 9, 2020)
2852
2853 ### Fixes
2854
2855 - rt: bug in work-stealing queue ([#2387])
2856
2857 ### Changes
2858
2859 - rt: threadpool uses logical CPU count instead of physical by default ([#2391])
2860
2861 [#2387]: https://github.com/tokio-rs/tokio/pull/2387
2862 [#2391]: https://github.com/tokio-rs/tokio/pull/2391
2863
2864 # 0.2.16 (April 3, 2020)
2865
2866 ### Fixes
2867
2868 - sync: fix a regression where `Mutex`, `Semaphore`, and `RwLock` futures no
2869 longer implement `Sync` ([#2375])
2870 - fs: fix `fs::copy` not copying file permissions ([#2354])
2871
2872 ### Added
2873
2874 - time: added `deadline` method to `delay_queue::Expired` ([#2300])
2875 - io: added `StreamReader` ([#2052])
2876
2877 [#2052]: https://github.com/tokio-rs/tokio/pull/2052
2878 [#2300]: https://github.com/tokio-rs/tokio/pull/2300
2879 [#2354]: https://github.com/tokio-rs/tokio/pull/2354
2880 [#2375]: https://github.com/tokio-rs/tokio/pull/2375
2881
2882 # 0.2.15 (April 2, 2020)
2883
2884 ### Fixes
2885
2886 - rt: fix queue regression ([#2362]).
2887
2888 ### Added
2889
2890 - sync: Add disarm to `mpsc::Sender` ([#2358]).
2891
2892 [#2358]: https://github.com/tokio-rs/tokio/pull/2358
2893 [#2362]: https://github.com/tokio-rs/tokio/pull/2362
2894
2895 # 0.2.14 (April 1, 2020)
2896
2897 ### Fixes
2898
2899 - rt: concurrency bug in scheduler ([#2273]).
2900 - rt: concurrency bug with shell runtime ([#2333]).
2901 - test-util: correct pause/resume of time ([#2253]).
2902 - time: `DelayQueue` correct wakeup after `insert` ([#2285]).
2903
2904 ### Added
2905
2906 - io: impl `RawFd`, `AsRawHandle` for std io types ([#2335]).
2907 - rt: automatic cooperative task yielding ([#2160], [#2343], [#2349]).
2908 - sync: `RwLock::into_inner` ([#2321]).
2909
2910 ### Changed
2911
2912 - sync: semaphore, mutex internals rewritten to avoid allocations ([#2325]).
2913
2914 [#2160]: https://github.com/tokio-rs/tokio/pull/2160
2915 [#2253]: https://github.com/tokio-rs/tokio/pull/2253
2916 [#2273]: https://github.com/tokio-rs/tokio/pull/2273
2917 [#2285]: https://github.com/tokio-rs/tokio/pull/2285
2918 [#2321]: https://github.com/tokio-rs/tokio/pull/2321
2919 [#2325]: https://github.com/tokio-rs/tokio/pull/2325
2920 [#2333]: https://github.com/tokio-rs/tokio/pull/2333
2921 [#2335]: https://github.com/tokio-rs/tokio/pull/2335
2922 [#2343]: https://github.com/tokio-rs/tokio/pull/2343
2923 [#2349]: https://github.com/tokio-rs/tokio/pull/2349
2924
2925 # 0.2.13 (February 28, 2020)
2926
2927 ### Fixes
2928
2929 - macros: unresolved import in `pin!` ([#2281]).
2930
2931 [#2281]: https://github.com/tokio-rs/tokio/pull/2281
2932
2933 # 0.2.12 (February 27, 2020)
2934
2935 ### Fixes
2936
2937 - net: `UnixStream::poll_shutdown` should call `shutdown(Write)` ([#2245]).
2938 - process: Wake up read and write on `EPOLLERR` ([#2218]).
2939 - rt: potential deadlock when using `block_in_place` and shutting down the
2940 runtime ([#2119]).
2941 - rt: only detect number of CPUs if `core_threads` not specified ([#2238]).
2942 - sync: reduce `watch::Receiver` struct size ([#2191]).
2943 - time: succeed when setting delay of `$MAX-1` ([#2184]).
2944 - time: avoid having to poll `DelayQueue` after inserting new delay ([#2217]).
2945
2946 ### Added
2947
2948 - macros: `pin!` variant that assigns to identifier and pins ([#2274]).
2949 - net: impl `Stream` for `Listener` types ([#2275]).
2950 - rt: `Runtime::shutdown_timeout` waits for runtime to shutdown for specified
2951 duration ([#2186]).
2952 - stream: `StreamMap` merges streams and can insert / remove streams at
2953 runtime ([#2185]).
2954 - stream: `StreamExt::skip()` skips a fixed number of items ([#2204]).
2955 - stream: `StreamExt::skip_while()` skips items based on a predicate ([#2205]).
2956 - sync: `Notify` provides basic `async` / `await` task notification ([#2210]).
2957 - sync: `Mutex::into_inner` retrieves guarded data ([#2250]).
2958 - sync: `mpsc::Sender::send_timeout` sends, waiting for up to specified duration
2959 for channel capacity ([#2227]).
2960 - time: impl `Ord` and `Hash` for `Instant` ([#2239]).
2961
2962 [#2119]: https://github.com/tokio-rs/tokio/pull/2119
2963 [#2184]: https://github.com/tokio-rs/tokio/pull/2184
2964 [#2185]: https://github.com/tokio-rs/tokio/pull/2185
2965 [#2186]: https://github.com/tokio-rs/tokio/pull/2186
2966 [#2191]: https://github.com/tokio-rs/tokio/pull/2191
2967 [#2204]: https://github.com/tokio-rs/tokio/pull/2204
2968 [#2205]: https://github.com/tokio-rs/tokio/pull/2205
2969 [#2210]: https://github.com/tokio-rs/tokio/pull/2210
2970 [#2217]: https://github.com/tokio-rs/tokio/pull/2217
2971 [#2218]: https://github.com/tokio-rs/tokio/pull/2218
2972 [#2227]: https://github.com/tokio-rs/tokio/pull/2227
2973 [#2238]: https://github.com/tokio-rs/tokio/pull/2238
2974 [#2239]: https://github.com/tokio-rs/tokio/pull/2239
2975 [#2245]: https://github.com/tokio-rs/tokio/pull/2245
2976 [#2250]: https://github.com/tokio-rs/tokio/pull/2250
2977 [#2274]: https://github.com/tokio-rs/tokio/pull/2274
2978 [#2275]: https://github.com/tokio-rs/tokio/pull/2275
2979
2980 # 0.2.11 (January 27, 2020)
2981
2982 ### Fixes
2983
2984 - docs: misc fixes and tweaks ([#2155], [#2103], [#2027], [#2167], [#2175]).
2985 - macros: handle generics in `#[tokio::main]` method ([#2177]).
2986 - sync: `broadcast` potential lost notifications ([#2135]).
2987 - rt: improve "no runtime" panic messages ([#2145]).
2988
2989 ### Added
2990
2991 - optional support for using `parking_lot` internally ([#2164]).
2992 - fs: `fs::copy`, an async version of `std::fs::copy` ([#2079]).
2993 - macros: `select!` waits for the first branch to complete ([#2152]).
2994 - macros: `join!` waits for all branches to complete ([#2158]).
2995 - macros: `try_join!` waits for all branches to complete or the first error ([#2169]).
2996 - macros: `pin!` pins a value to the stack ([#2163]).
2997 - net: `ReadHalf::poll()` and `ReadHalf::poll_peak` ([#2151])
2998 - stream: `StreamExt::timeout()` sets a per-item max duration ([#2149]).
2999 - stream: `StreamExt::fold()` applies a function, producing a single value. ([#2122]).
3000 - sync: impl `Eq`, `PartialEq` for `oneshot::RecvError` ([#2168]).
3001 - task: methods for inspecting the `JoinError` cause ([#2051]).
3002
3003 [#2027]: https://github.com/tokio-rs/tokio/pull/2027
3004 [#2051]: https://github.com/tokio-rs/tokio/pull/2051
3005 [#2079]: https://github.com/tokio-rs/tokio/pull/2079
3006 [#2103]: https://github.com/tokio-rs/tokio/pull/2103
3007 [#2122]: https://github.com/tokio-rs/tokio/pull/2122
3008 [#2135]: https://github.com/tokio-rs/tokio/pull/2135
3009 [#2145]: https://github.com/tokio-rs/tokio/pull/2145
3010 [#2149]: https://github.com/tokio-rs/tokio/pull/2149
3011 [#2151]: https://github.com/tokio-rs/tokio/pull/2151
3012 [#2152]: https://github.com/tokio-rs/tokio/pull/2152
3013 [#2155]: https://github.com/tokio-rs/tokio/pull/2155
3014 [#2158]: https://github.com/tokio-rs/tokio/pull/2158
3015 [#2163]: https://github.com/tokio-rs/tokio/pull/2163
3016 [#2164]: https://github.com/tokio-rs/tokio/pull/2164
3017 [#2167]: https://github.com/tokio-rs/tokio/pull/2167
3018 [#2168]: https://github.com/tokio-rs/tokio/pull/2168
3019 [#2169]: https://github.com/tokio-rs/tokio/pull/2169
3020 [#2175]: https://github.com/tokio-rs/tokio/pull/2175
3021 [#2177]: https://github.com/tokio-rs/tokio/pull/2177
3022
3023 # 0.2.10 (January 21, 2020)
3024
3025 ### Fixes
3026
3027 - `#[tokio::main]` when `rt-core` feature flag is not enabled ([#2139]).
3028 - remove `AsyncBufRead` from `BufStream` impl block ([#2108]).
3029 - potential undefined behavior when implementing `AsyncRead` incorrectly ([#2030]).
3030
3031 ### Added
3032
3033 - `BufStream::with_capacity` ([#2125]).
3034 - impl `From` and `Default` for `RwLock` ([#2089]).
3035 - `io::ReadHalf::is_pair_of` checks if provided `WriteHalf` is for the same
3036 underlying object ([#1762], [#2144]).
3037 - `runtime::Handle::try_current()` returns a handle to the current runtime ([#2118]).
3038 - `stream::empty()` returns an immediately ready empty stream ([#2092]).
3039 - `stream::once(val)` returns a stream that yields a single value: `val` ([#2094]).
3040 - `stream::pending()` returns a stream that never becomes ready ([#2092]).
3041 - `StreamExt::chain()` sequences a second stream after the first completes ([#2093]).
3042 - `StreamExt::collect()` transform a stream into a collection ([#2109]).
3043 - `StreamExt::fuse` ends the stream after the first `None` ([#2085]).
3044 - `StreamExt::merge` combines two streams, yielding values as they become ready ([#2091]).
3045 - Task-local storage ([#2126]).
3046
3047 [#1762]: https://github.com/tokio-rs/tokio/pull/1762
3048 [#2030]: https://github.com/tokio-rs/tokio/pull/2030
3049 [#2085]: https://github.com/tokio-rs/tokio/pull/2085
3050 [#2089]: https://github.com/tokio-rs/tokio/pull/2089
3051 [#2091]: https://github.com/tokio-rs/tokio/pull/2091
3052 [#2092]: https://github.com/tokio-rs/tokio/pull/2092
3053 [#2093]: https://github.com/tokio-rs/tokio/pull/2093
3054 [#2094]: https://github.com/tokio-rs/tokio/pull/2094
3055 [#2108]: https://github.com/tokio-rs/tokio/pull/2108
3056 [#2109]: https://github.com/tokio-rs/tokio/pull/2109
3057 [#2118]: https://github.com/tokio-rs/tokio/pull/2118
3058 [#2125]: https://github.com/tokio-rs/tokio/pull/2125
3059 [#2126]: https://github.com/tokio-rs/tokio/pull/2126
3060 [#2139]: https://github.com/tokio-rs/tokio/pull/2139
3061 [#2144]: https://github.com/tokio-rs/tokio/pull/2144
3062
3063 # 0.2.9 (January 9, 2020)
3064
3065 ### Fixes
3066
3067 - `AsyncSeek` impl for `File` ([#1986]).
3068 - rt: shutdown deadlock in `threaded_scheduler` ([#2074], [#2082]).
3069 - rt: memory ordering when dropping `JoinHandle` ([#2044]).
3070 - docs: misc API documentation fixes and improvements.
3071
3072 [#1986]: https://github.com/tokio-rs/tokio/pull/1986
3073 [#2044]: https://github.com/tokio-rs/tokio/pull/2044
3074 [#2074]: https://github.com/tokio-rs/tokio/pull/2074
3075 [#2082]: https://github.com/tokio-rs/tokio/pull/2082
3076
3077 # 0.2.8 (January 7, 2020)
3078
3079 ### Fixes
3080
3081 - depend on new version of `tokio-macros`.
3082
3083 # 0.2.7 (January 7, 2020)
3084
3085 ### Fixes
3086
3087 - potential deadlock when dropping `basic_scheduler` Runtime.
3088 - calling `spawn_blocking` from within a `spawn_blocking` ([#2006]).
3089 - storing a `Runtime` instance in a thread-local ([#2011]).
3090 - miscellaneous documentation fixes.
3091 - rt: fix `Waker::will_wake` to return true when tasks match ([#2045]).
3092 - test-util: `time::advance` runs pending tasks before changing the time ([#2059]).
3093
3094 ### Added
3095
3096 - `net::lookup_host` maps a `T: ToSocketAddrs` to a stream of `SocketAddrs` ([#1870]).
3097 - `process::Child` fields are made public to match `std` ([#2014]).
3098 - impl `Stream` for `sync::broadcast::Receiver` ([#2012]).
3099 - `sync::RwLock` provides an asynchronous read-write lock ([#1699]).
3100 - `runtime::Handle::current` returns the handle for the current runtime ([#2040]).
3101 - `StreamExt::filter` filters stream values according to a predicate ([#2001]).
3102 - `StreamExt::filter_map` simultaneously filter and map stream values ([#2001]).
3103 - `StreamExt::try_next` convenience for streams of `Result<T, E>` ([#2005]).
3104 - `StreamExt::take` limits a stream to a specified number of values ([#2025]).
3105 - `StreamExt::take_while` limits a stream based on a predicate ([#2029]).
3106 - `StreamExt::all` tests if every element of the stream matches a predicate ([#2035]).
3107 - `StreamExt::any` tests if any element of the stream matches a predicate ([#2034]).
3108 - `task::LocalSet.await` runs spawned tasks until the set is idle ([#1971]).
3109 - `time::DelayQueue::len` returns the number entries in the queue ([#1755]).
3110 - expose runtime options from the `#[tokio::main]` and `#[tokio::test]` ([#2022]).
3111
3112 [#1699]: https://github.com/tokio-rs/tokio/pull/1699
3113 [#1755]: https://github.com/tokio-rs/tokio/pull/1755
3114 [#1870]: https://github.com/tokio-rs/tokio/pull/1870
3115 [#1971]: https://github.com/tokio-rs/tokio/pull/1971
3116 [#2001]: https://github.com/tokio-rs/tokio/pull/2001
3117 [#2005]: https://github.com/tokio-rs/tokio/pull/2005
3118 [#2006]: https://github.com/tokio-rs/tokio/pull/2006
3119 [#2011]: https://github.com/tokio-rs/tokio/pull/2011
3120 [#2012]: https://github.com/tokio-rs/tokio/pull/2012
3121 [#2014]: https://github.com/tokio-rs/tokio/pull/2014
3122 [#2022]: https://github.com/tokio-rs/tokio/pull/2022
3123 [#2025]: https://github.com/tokio-rs/tokio/pull/2025
3124 [#2029]: https://github.com/tokio-rs/tokio/pull/2029
3125 [#2034]: https://github.com/tokio-rs/tokio/pull/2034
3126 [#2035]: https://github.com/tokio-rs/tokio/pull/2035
3127 [#2040]: https://github.com/tokio-rs/tokio/pull/2040
3128 [#2045]: https://github.com/tokio-rs/tokio/pull/2045
3129 [#2059]: https://github.com/tokio-rs/tokio/pull/2059
3130
3131 # 0.2.6 (December 19, 2019)
3132
3133 ### Fixes
3134
3135 - `fs::File::seek` API regression ([#1991]).
3136
3137 [#1991]: https://github.com/tokio-rs/tokio/pull/1991
3138
3139 # 0.2.5 (December 18, 2019)
3140
3141 ### Added
3142
3143 - `io::AsyncSeek` trait ([#1924]).
3144 - `Mutex::try_lock` ([#1939])
3145 - `mpsc::Receiver::try_recv` and `mpsc::UnboundedReceiver::try_recv` ([#1939]).
3146 - `writev` support for `TcpStream` ([#1956]).
3147 - `time::throttle` for throttling streams ([#1949]).
3148 - implement `Stream` for `time::DelayQueue` ([#1975]).
3149 - `sync::broadcast` provides a fan-out channel ([#1943]).
3150 - `sync::Semaphore` provides an async semaphore ([#1973]).
3151 - `stream::StreamExt` provides stream utilities ([#1962]).
3152
3153 ### Fixes
3154
3155 - deadlock risk while shutting down the runtime ([#1972]).
3156 - panic while shutting down the runtime ([#1978]).
3157 - `sync::MutexGuard` debug output ([#1961]).
3158 - misc doc improvements ([#1933], [#1934], [#1940], [#1942]).
3159
3160 ### Changes
3161
3162 - runtime threads are configured with `runtime::Builder::core_threads` and
3163 `runtime::Builder::max_threads`. `runtime::Builder::num_threads` is
3164 deprecated ([#1977]).
3165
3166 [#1924]: https://github.com/tokio-rs/tokio/pull/1924
3167 [#1933]: https://github.com/tokio-rs/tokio/pull/1933
3168 [#1934]: https://github.com/tokio-rs/tokio/pull/1934
3169 [#1939]: https://github.com/tokio-rs/tokio/pull/1939
3170 [#1940]: https://github.com/tokio-rs/tokio/pull/1940
3171 [#1942]: https://github.com/tokio-rs/tokio/pull/1942
3172 [#1943]: https://github.com/tokio-rs/tokio/pull/1943
3173 [#1949]: https://github.com/tokio-rs/tokio/pull/1949
3174 [#1956]: https://github.com/tokio-rs/tokio/pull/1956
3175 [#1961]: https://github.com/tokio-rs/tokio/pull/1961
3176 [#1962]: https://github.com/tokio-rs/tokio/pull/1962
3177 [#1972]: https://github.com/tokio-rs/tokio/pull/1972
3178 [#1973]: https://github.com/tokio-rs/tokio/pull/1973
3179 [#1975]: https://github.com/tokio-rs/tokio/pull/1975
3180 [#1977]: https://github.com/tokio-rs/tokio/pull/1977
3181 [#1978]: https://github.com/tokio-rs/tokio/pull/1978
3182
3183 # 0.2.4 (December 6, 2019)
3184
3185 ### Fixes
3186
3187 - `sync::Mutex` deadlock when `lock()` future is dropped early ([#1898]).
3188
3189 [#1898]: https://github.com/tokio-rs/tokio/pull/1898
3190
3191 # 0.2.3 (December 6, 2019)
3192
3193 ### Added
3194
3195 - read / write integers using `AsyncReadExt` and `AsyncWriteExt` ([#1863]).
3196 - `read_buf` / `write_buf` for reading / writing `Buf` / `BufMut` ([#1881]).
3197 - `TcpStream::poll_peek` - pollable API for performing TCP peek ([#1864]).
3198 - `sync::oneshot::error::TryRecvError` provides variants to detect the error
3199 kind ([#1874]).
3200 - `LocalSet::block_on` accepts `!'static` task ([#1882]).
3201 - `task::JoinError` is now `Sync` ([#1888]).
3202 - impl conversions between `tokio::time::Instant` and
3203 `std::time::Instant` ([#1904]).
3204
3205 ### Fixes
3206
3207 - calling `spawn_blocking` after runtime shutdown ([#1875]).
3208 - `LocalSet` drop infinite loop ([#1892]).
3209 - `LocalSet` hang under load ([#1905]).
3210 - improved documentation ([#1865], [#1866], [#1868], [#1874], [#1876], [#1911]).
3211
3212 [#1863]: https://github.com/tokio-rs/tokio/pull/1863
3213 [#1864]: https://github.com/tokio-rs/tokio/pull/1864
3214 [#1865]: https://github.com/tokio-rs/tokio/pull/1865
3215 [#1866]: https://github.com/tokio-rs/tokio/pull/1866
3216 [#1868]: https://github.com/tokio-rs/tokio/pull/1868
3217 [#1874]: https://github.com/tokio-rs/tokio/pull/1874
3218 [#1875]: https://github.com/tokio-rs/tokio/pull/1875
3219 [#1876]: https://github.com/tokio-rs/tokio/pull/1876
3220 [#1881]: https://github.com/tokio-rs/tokio/pull/1881
3221 [#1882]: https://github.com/tokio-rs/tokio/pull/1882
3222 [#1888]: https://github.com/tokio-rs/tokio/pull/1888
3223 [#1892]: https://github.com/tokio-rs/tokio/pull/1892
3224 [#1904]: https://github.com/tokio-rs/tokio/pull/1904
3225 [#1905]: https://github.com/tokio-rs/tokio/pull/1905
3226 [#1911]: https://github.com/tokio-rs/tokio/pull/1911
3227
3228 # 0.2.2 (November 29, 2019)
3229
3230 ### Fixes
3231
3232 - scheduling with `basic_scheduler` ([#1861]).
3233 - update `spawn` panic message to specify that a task scheduler is required ([#1839]).
3234 - API docs example for `runtime::Builder` to include a task scheduler ([#1841]).
3235 - general documentation ([#1834]).
3236 - building on illumos/solaris ([#1772]).
3237 - panic when dropping `LocalSet` ([#1843]).
3238 - API docs mention the required Cargo features for `Builder::{basic, threaded}_scheduler` ([#1858]).
3239
3240 ### Added
3241
3242 - impl `Stream` for `signal::unix::Signal` ([#1849]).
3243 - API docs for platform specific behavior of `signal::ctrl_c` and `signal::unix::Signal` ([#1854]).
3244 - API docs for `signal::unix::Signal::{recv, poll_recv}` and `signal::windows::CtrlBreak::{recv, poll_recv}` ([#1854]).
3245 - `File::into_std` and `File::try_into_std` methods ([#1856]).
3246
3247 [#1772]: https://github.com/tokio-rs/tokio/pull/1772
3248 [#1834]: https://github.com/tokio-rs/tokio/pull/1834
3249 [#1839]: https://github.com/tokio-rs/tokio/pull/1839
3250 [#1841]: https://github.com/tokio-rs/tokio/pull/1841
3251 [#1843]: https://github.com/tokio-rs/tokio/pull/1843
3252 [#1849]: https://github.com/tokio-rs/tokio/pull/1849
3253 [#1854]: https://github.com/tokio-rs/tokio/pull/1854
3254 [#1856]: https://github.com/tokio-rs/tokio/pull/1856
3255 [#1858]: https://github.com/tokio-rs/tokio/pull/1858
3256 [#1861]: https://github.com/tokio-rs/tokio/pull/1861
3257
3258 # 0.2.1 (November 26, 2019)
3259
3260 ### Fixes
3261
3262 - API docs for `TcpListener::incoming`, `UnixListener::incoming` ([#1831]).
3263
3264 ### Added
3265
3266 - `tokio::task::LocalSet` provides a strategy for spawning `!Send` tasks ([#1733]).
3267 - export `tokio::time::Elapsed` ([#1826]).
3268 - impl `AsRawFd`, `AsRawHandle` for `tokio::fs::File` ([#1827]).
3269
3270 [#1733]: https://github.com/tokio-rs/tokio/pull/1733
3271 [#1826]: https://github.com/tokio-rs/tokio/pull/1826
3272 [#1827]: https://github.com/tokio-rs/tokio/pull/1827
3273 [#1831]: https://github.com/tokio-rs/tokio/pull/1831
3274
3275 # 0.2.0 (November 26, 2019)
3276
3277 A major breaking change. Most implementation and APIs have changed one way or
3278 another. This changelog entry contains a highlight
3279
3280 ### Changed
3281
3282 - APIs are updated to use `async / await`.
3283 - most `tokio-*` crates are collapsed into this crate.
3284 - Scheduler is rewritten.
3285 - `tokio::spawn` returns a `JoinHandle`.
3286 - A single I/O / timer is used per runtime.
3287 - I/O driver uses a concurrent slab for allocating state.
3288 - components are made available via feature flag.
3289 - Use `bytes` 0.5
3290 - `tokio::codec` is moved to `tokio-util`.
3291
3292 ### Removed
3293
3294 - Standalone `timer` and `net` drivers are removed, use `Runtime` instead
3295 - `current_thread` runtime is removed, use `tokio::runtime::Runtime` with
3296 `basic_scheduler` instead.
3297
3298 # 0.1.21 (May 30, 2019)
3299
3300 ### Changed
3301
3302 - Bump `tokio-trace-core` version to 0.2 ([#1111]).
3303
3304 [#1111]: https://github.com/tokio-rs/tokio/pull/1111
3305
3306 # 0.1.20 (May 14, 2019)
3307
3308 ### Added
3309
3310 - `tokio::runtime::Builder::panic_handler` allows configuring handling
3311 panics on the runtime ([#1055]).
3312
3313 [#1055]: https://github.com/tokio-rs/tokio/pull/1055
3314
3315 # 0.1.19 (April 22, 2019)
3316
3317 ### Added
3318
3319 - Re-export `tokio::sync::Mutex` primitive ([#964]).
3320
3321 [#964]: https://github.com/tokio-rs/tokio/pull/964
3322
3323 # 0.1.18 (March 22, 2019)
3324
3325 ### Added
3326
3327 - `TypedExecutor` re-export and implementations ([#993]).
3328
3329 [#993]: https://github.com/tokio-rs/tokio/pull/993
3330
3331 # 0.1.17 (March 13, 2019)
3332
3333 ### Added
3334
3335 - Propagate trace subscriber in the runtime ([#966]).
3336
3337 [#966]: https://github.com/tokio-rs/tokio/pull/966
3338
3339 # 0.1.16 (March 1, 2019)
3340
3341 ### Fixed
3342
3343 - async-await: track latest nightly changes ([#940]).
3344
3345 ### Added
3346
3347 - `sync::Watch`, a single value broadcast channel ([#922]).
3348 - Async equivalent of read / write file helpers being added to `std` ([#896]).
3349
3350 [#896]: https://github.com/tokio-rs/tokio/pull/896
3351 [#922]: https://github.com/tokio-rs/tokio/pull/922
3352 [#940]: https://github.com/tokio-rs/tokio/pull/940
3353
3354 # 0.1.15 (January 24, 2019)
3355
3356 ### Added
3357
3358 - Re-export tokio-sync APIs ([#839]).
3359 - Stream enumerate combinator ([#832]).
3360
3361 [#832]: https://github.com/tokio-rs/tokio/pull/832
3362 [#839]: https://github.com/tokio-rs/tokio/pull/839
3363
3364 # 0.1.14 (January 6, 2019)
3365
3366 - Use feature flags to break up the crate, allowing users to pick & choose
3367 components ([#808]).
3368 - Export `UnixDatagram` and `UnixDatagramFramed` ([#772]).
3369
3370 [#772]: https://github.com/tokio-rs/tokio/pull/772
3371 [#808]: https://github.com/tokio-rs/tokio/pull/808
3372
3373 # 0.1.13 (November 21, 2018)
3374
3375 - Fix `Runtime::reactor()` when no tasks are spawned ([#721]).
3376 - `runtime::Builder` no longer uses deprecated methods ([#749]).
3377 - Provide `after_start` and `before_stop` configuration settings for
3378 `Runtime` ([#756]).
3379 - Implement throttle stream combinator ([#736]).
3380
3381 [#721]: https://github.com/tokio-rs/tokio/pull/721
3382 [#736]: https://github.com/tokio-rs/tokio/pull/736
3383 [#749]: https://github.com/tokio-rs/tokio/pull/749
3384 [#756]: https://github.com/tokio-rs/tokio/pull/756
3385
3386 # 0.1.12 (October 23, 2018)
3387
3388 - runtime: expose `keep_alive` on runtime builder ([#676]).
3389 - runtime: create a reactor per worker thread ([#660]).
3390 - codec: fix panic in `LengthDelimitedCodec` ([#682]).
3391 - io: re-export `tokio_io::io::read` function ([#689]).
3392 - runtime: check for executor re-entry in more places ([#708]).
3393
3394 [#660]: https://github.com/tokio-rs/tokio/pull/660
3395 [#676]: https://github.com/tokio-rs/tokio/pull/676
3396 [#682]: https://github.com/tokio-rs/tokio/pull/682
3397 [#689]: https://github.com/tokio-rs/tokio/pull/689
3398 [#708]: https://github.com/tokio-rs/tokio/pull/708
3399
3400 # 0.1.11 (September 28, 2018)
3401
3402 - Fix `tokio-async-await` dependency ([#675]).
3403
3404 [#675]: https://github.com/tokio-rs/tokio/pull/675
3405
3406 # 0.1.10 (September 27, 2018)
3407
3408 - Fix minimal versions
3409
3410 # 0.1.9 (September 27, 2018)
3411
3412 - Experimental async/await improvements ([#661]).
3413 - Re-export `TaskExecutor` from `tokio-current-thread` ([#652]).
3414 - Improve `Runtime` builder API ([#645]).
3415 - `tokio::run` panics when called from the context of an executor
3416 ([#646]).
3417 - Introduce `StreamExt` with a `timeout` helper ([#573]).
3418 - Move `length_delimited` into `tokio` ([#575]).
3419 - Re-organize `tokio::net` module ([#548]).
3420 - Re-export `tokio-current-thread::spawn` in current_thread runtime
3421 ([#579]).
3422
3423 [#548]: https://github.com/tokio-rs/tokio/pull/548
3424 [#573]: https://github.com/tokio-rs/tokio/pull/573
3425 [#575]: https://github.com/tokio-rs/tokio/pull/575
3426 [#579]: https://github.com/tokio-rs/tokio/pull/579
3427 [#645]: https://github.com/tokio-rs/tokio/pull/645
3428 [#646]: https://github.com/tokio-rs/tokio/pull/646
3429 [#652]: https://github.com/tokio-rs/tokio/pull/652
3430 [#661]: https://github.com/tokio-rs/tokio/pull/661
3431
3432 # 0.1.8 (August 23, 2018)
3433
3434 - Extract tokio::executor::current_thread to a sub crate ([#370])
3435 - Add `Runtime::block_on` ([#398])
3436 - Add `runtime::current_thread::block_on_all` ([#477])
3437 - Misc documentation improvements ([#450])
3438 - Implement `std::error::Error` for error types ([#501])
3439
3440 [#370]: https://github.com/tokio-rs/tokio/pull/370
3441 [#398]: https://github.com/tokio-rs/tokio/pull/398
3442 [#450]: https://github.com/tokio-rs/tokio/pull/450
3443 [#477]: https://github.com/tokio-rs/tokio/pull/477
3444 [#501]: https://github.com/tokio-rs/tokio/pull/501
3445
3446 # 0.1.7 (June 6, 2018)
3447
3448 - Add `Runtime::block_on` for concurrent runtime ([#391]).
3449 - Provide handle to `current_thread::Runtime` that allows spawning tasks from
3450 other threads ([#340]).
3451 - Provide `clock::now()`, a configurable source of time ([#381]).
3452
3453 [#340]: https://github.com/tokio-rs/tokio/pull/340
3454 [#381]: https://github.com/tokio-rs/tokio/pull/381
3455 [#391]: https://github.com/tokio-rs/tokio/pull/391
3456
3457 # 0.1.6 (May 2, 2018)
3458
3459 - Add asynchronous filesystem APIs ([#323]).
3460 - Add "current thread" runtime variant ([#308]).
3461 - `CurrentThread`: Expose inner `Park` instance.
3462 - Improve fairness of `CurrentThread` executor ([#313]).
3463
3464 [#308]: https://github.com/tokio-rs/tokio/pull/308
3465 [#313]: https://github.com/tokio-rs/tokio/pull/313
3466 [#323]: https://github.com/tokio-rs/tokio/pull/323
3467
3468 # 0.1.5 (March 30, 2018)
3469
3470 - Provide timer API ([#266])
3471
3472 [#266]: https://github.com/tokio-rs/tokio/pull/266
3473
3474 # 0.1.4 (March 22, 2018)
3475
3476 - Fix build on FreeBSD ([#218])
3477 - Shutdown the Runtime when the handle is dropped ([#214])
3478 - Set Runtime thread name prefix for worker threads ([#232])
3479 - Add builder for Runtime ([#234])
3480 - Extract TCP and UDP types into separate crates ([#224])
3481 - Optionally support futures 0.2.
3482
3483 [#214]: https://github.com/tokio-rs/tokio/pull/214
3484 [#218]: https://github.com/tokio-rs/tokio/pull/218
3485 [#224]: https://github.com/tokio-rs/tokio/pull/224
3486 [#232]: https://github.com/tokio-rs/tokio/pull/232
3487 [#234]: https://github.com/tokio-rs/tokio/pull/234
3488
3489 # 0.1.3 (March 09, 2018)
3490
3491 - Fix `CurrentThread::turn` to block on idle ([#212]).
3492
3493 [#212]: https://github.com/tokio-rs/tokio/pull/212
3494
3495 # 0.1.2 (March 09, 2018)
3496
3497 - Introduce Tokio Runtime ([#141])
3498 - Provide `CurrentThread` for more flexible usage of current thread executor ([#141]).
3499 - Add Lio for platforms that support it ([#142]).
3500 - I/O resources now lazily bind to the reactor ([#160]).
3501 - Extract Reactor to dedicated crate ([#169])
3502 - Add facade to sub crates and add prelude ([#166]).
3503 - Switch TCP/UDP fns to poll\_ -> Poll<...> style ([#175])
3504
3505 [#141]: https://github.com/tokio-rs/tokio/pull/141
3506 [#142]: https://github.com/tokio-rs/tokio/pull/142
3507 [#160]: https://github.com/tokio-rs/tokio/pull/160
3508 [#166]: https://github.com/tokio-rs/tokio/pull/166
3509 [#169]: https://github.com/tokio-rs/tokio/pull/169
3510 [#175]: https://github.com/tokio-rs/tokio/pull/175
3511
3512 # 0.1.1 (February 09, 2018)
3513
3514 - Doc fixes
3515
3516 # 0.1.0 (February 07, 2018)
3517
3518 - Initial crate released based on [RFC](https://github.com/tokio-rs/tokio-rfcs/pull/3).