162 Commits

Author SHA1 Message Date
Alice Ryhl
9c337ca1a3
chore: prepare Tokio v1.37.0 (#6435) 2024-03-28 17:34:42 +01:00
Alice Ryhl
e0d33c4a20
tokio: mark 1.36 as an LTS release (#6375) 2024-03-03 20:44:38 +00:00
M.Amin Rayej
eaf81ed324
chore: prepare Tokio v1.36.0 (#6312) 2024-02-02 11:13:46 +00:00
Alice Ryhl
46ff36386d
chore: prepare Tokio v1.35.1 (#6230) 2023-12-19 18:14:34 +01:00
Alice Ryhl
92a3455c66
chore: prepare Tokio v1.35.0 (#6197) 2023-12-08 23:35:27 +01:00
Carl Lerche
49eb26f159
chore: prepare Tokio v1.34.0 release (#6138)
This also includes:
  - tokio-macros v2.2.0
2023-11-09 11:22:54 -08:00
Alice Ryhl
1b8ebfcffb
readme: remove rdbc and add axum to related projects (#6077) 2023-10-16 10:25:40 +02:00
Tymoteusz Wiśniewski
c00861210b
chore: move 1.20.x to previous LTS releases (#6069) 2023-10-12 18:18:03 +02:00
Tymoteusz Wiśniewski
0457690d01
chore: prepare Tokio v1.33.0 release (#6059) 2023-10-09 11:55:17 +02:00
Hayden Stainsby
8ea303e027
chore: list 1.32.x as LTS release (#5980) 2023-09-05 10:02:50 +02:00
Carl Lerche
a7d52c2fed
chore: prepare Tokio v1.32.0 release (#5937) 2023-08-16 14:11:30 -07:00
Alice Ryhl
40633fc678
readme: list previous LTS releases (#5931) 2023-08-14 19:10:24 +02:00
Carl Lerche
8b8005ebdd
chore: prepare Tokio v1.31.0 release (#5928) 2023-08-12 09:37:49 -07:00
Brian Cardarella
4c220af777
chore: prepare Tokio v1.30.0 release (#5917) 2023-08-09 15:16:11 +00:00
Jiahao XU
c445e467ce
tokio: bump MSRV to 1.63 (#5887) 2023-07-27 10:57:19 +02:00
Carl Lerche
1b1b9dc7e3
chore: prepare Tokio v1.29.1 release 2023-06-29 14:27:28 -07:00
Carl Lerche
48c55768fd
chore: prepare Tokio v1.29.0 release (#5826) 2023-06-27 13:37:10 -07:00
Alice Ryhl
e87ff8a83a
chore: prepare Tokio v1.28.2 (#5736) 2023-05-27 20:38:02 +02:00
Alice Ryhl
a26fc9c9f9
chore: prepare Tokio v1.28.1 (#5679) 2023-05-10 10:44:04 +02:00
Alice Ryhl
f21d596099
chore: prepare Tokio v1.28.0 (#5650) 2023-04-25 20:21:00 +02:00
Alice Ryhl
1df874ead4
chore: prepare Tokio v1.27.0 (#5584) 2023-03-27 23:55:48 +02:00
Alice Ryhl
0c8e8248f8
tokio: bump MSRV to 1.56 (#5559) 2023-03-21 18:06:47 +01:00
Noah Kennedy
9931901d5c
chore: list 1.25.x as LTS release (#5524) 2023-03-01 23:42:18 +00:00
Noah Kennedy
a377240bbf
chore: prepare for Tokio v1.26.0 release (#5521)
# 1.26.0 (March 1st, 2023)

### Fixed

- macros: fix empty `join!` and `try_join!` ([#5504])
- sync: don't leak tracing spans in mutex guards ([#5469])
- sync: drop wakers after unlocking the mutex in Notify ([#5471])
- sync: drop wakers outside lock in semaphore ([#5475])

### Added

- fs: add `fs::try_exists` ([#4299])
- net: add types for named unix pipes ([#5351])
- sync: add `MappedOwnedMutexGuard` ([#5474])

### Changed

- chore: update windows-sys to 0.45 ([#5386])
- net: use Message Read Mode for named pipes ([#5350])
- sync: mark lock guards with `#[clippy::has_significant_drop]` ([#5422])
- sync: reduce contention in watch channel ([#5464])
- time: remove cache padding in timer entries ([#5468])
- time: Improve `Instant::now()` perf with test-util ([#5513])

### Internal Changes

- io: use `poll_fn` in `copy_bidirectional` ([#5486])
- net: refactor named pipe builders to not use bitfields ([#5477])
- rt: remove Arc from Clock ([#5434])
- sync: make `notify_waiters` calls atomic ([#5458])
- time: don't store deadline twice in sleep entries ([#5410])

### Unstable

- metrics: add a new metric for budget exhaustion yields ([#5517])

### Documented

- io: improve AsyncFd example ([#5481])
- runtime: document the nature of the main future ([#5494])
- runtime: remove extra period in docs ([#5511])
- signal: updated Documentation for Signals ([#5459])
- sync: add doc aliases for `blocking_*` methods ([#5448])
- sync: fix docs for Send/Sync bounds in broadcast ([#5480])
- sync: document drop behavior for channels ([#5497])
- task: clarify what happens to spawned work during runtime shutdown ([#5394])
- task: clarify `process::Command` docs ([#5413])
- task: fix wording with 'unsend' ([#5452])
- time: document immediate completion guarantee for timeouts ([#5509])
- tokio: document supported platforms ([#5483])

[#4299]: https://github.com/tokio-rs/tokio/pull/4299
[#5350]: https://github.com/tokio-rs/tokio/pull/5350
[#5351]: https://github.com/tokio-rs/tokio/pull/5351
[#5386]: https://github.com/tokio-rs/tokio/pull/5386
[#5394]: https://github.com/tokio-rs/tokio/pull/5394
[#5410]: https://github.com/tokio-rs/tokio/pull/5410
[#5413]: https://github.com/tokio-rs/tokio/pull/5413
[#5422]: https://github.com/tokio-rs/tokio/pull/5422
[#5434]: https://github.com/tokio-rs/tokio/pull/5434
[#5448]: https://github.com/tokio-rs/tokio/pull/5448
[#5452]: https://github.com/tokio-rs/tokio/pull/5452
[#5458]: https://github.com/tokio-rs/tokio/pull/5458
[#5459]: https://github.com/tokio-rs/tokio/pull/5459
[#5464]: https://github.com/tokio-rs/tokio/pull/5464
[#5468]: https://github.com/tokio-rs/tokio/pull/5468
[#5469]: https://github.com/tokio-rs/tokio/pull/5469
[#5471]: https://github.com/tokio-rs/tokio/pull/5471
[#5474]: https://github.com/tokio-rs/tokio/pull/5474
[#5475]: https://github.com/tokio-rs/tokio/pull/5475
[#5477]: https://github.com/tokio-rs/tokio/pull/5477
[#5480]: https://github.com/tokio-rs/tokio/pull/5480
[#5481]: https://github.com/tokio-rs/tokio/pull/5481
[#5483]: https://github.com/tokio-rs/tokio/pull/5483
[#5486]: https://github.com/tokio-rs/tokio/pull/5486
[#5494]: https://github.com/tokio-rs/tokio/pull/5494
[#5497]: https://github.com/tokio-rs/tokio/pull/5497
[#5504]: https://github.com/tokio-rs/tokio/pull/5504
[#5509]: https://github.com/tokio-rs/tokio/pull/5509
[#5511]: https://github.com/tokio-rs/tokio/pull/5511
[#5513]: https://github.com/tokio-rs/tokio/pull/5513
[#5517]: https://github.com/tokio-rs/tokio/pull/5517
2023-03-01 22:09:48 +00:00
Steven Fackler
88b1eb54fb
chore: prepare Tokio v1.25.0 release (#5408) 2023-01-29 22:44:31 +01:00
Carl Lerche
4f6a95badc
chore: prepare Tokio v1.24.2 release 2023-01-17 12:26:13 -08:00
Alice Ryhl
31c7e82919
chore: prepare Tokio v1.24.1 (#5357) 2023-01-06 10:48:42 +00:00
Carl Lerche
dfe252d1fa
chore: prepare Tokio v1.24.0 release (#5353) 2023-01-05 11:20:35 -08:00
Carl Lerche
1a997ffbd6
chore: prepare Tokio v1.23.1 release 2023-01-04 10:32:38 -08:00
Carl Lerche
3ce5a2681c
chore: prepare Tokio v1.23 release (#5270)
### Fixed
 - net: fix Windows named pipe connect ([#5208])
 - io: support vectored writes for `ChildStdin` ([#5216])
 - io: fix `async fn ready()` false positive for OS-specific events ([#5231])

 ### Changed
 - runtime: `yield_now` defers task until after driver poll ([#5223])
 - runtime: reduce amount of codegen needed per spawned task ([#5213])
 - windows: replace `winapi` dependency with `windows-sys` ([#5204])

 [#5208]: https://github.com/tokio-rs/tokio/pull/5208
 [#5216]: https://github.com/tokio-rs/tokio/pull/5216
 [#5213]: https://github.com/tokio-rs/tokio/pull/5213
 [#5204]: https://github.com/tokio-rs/tokio/pull/5204
 [#5223]: https://github.com/tokio-rs/tokio/pull/5223
 [#5231]: https://github.com/tokio-rs/tokio/pull/5231
2022-12-05 15:22:43 -08:00
Alice Ryhl
bf31759bff
chore: prepare Tokio v1.22.0 (#5203) 2022-11-18 13:15:06 -08:00
Alice Ryhl
a79b824faa
chore: prepare Tokio v1.21.2 (#5058) 2022-09-27 21:42:23 +02:00
Alice Ryhl
dea1cd4995
chore: prepare Tokio v1.21.1 (#5003) 2022-09-13 11:20:59 +02:00
Alice Ryhl
50795e652e
chore: prepare Tokio v1.21.0 (#4967) 2022-09-02 13:51:31 +02:00
Alice Ryhl
e5467ca767
tokio: increase LTS duration to one year (#4964) 2022-09-01 21:30:51 +00:00
Alice Ryhl
f207e1afe4
tokio: make 1.20.x an LTS release (#4962) 2022-09-01 21:08:31 +02:00
Alice Ryhl
6e7a630243
docs: add changelog links to readme (#4907) 2022-08-12 15:57:53 +02:00
Alice Ryhl
c0746b6a30 chore: prepare Tokio v1.20.1 (#4861) 2022-07-25 14:21:00 +02:00
Noah Kennedy
b343767725
chore: prepare Tokio v1.20.0 (#4830) 2022-07-12 22:03:44 +00:00
Alice Ryhl
340c4dc3b2
chore: prepare Tokio v1.19.2 (#4754) 2022-06-06 17:38:28 +02:00
Alice Ryhl
bac7984417
chore: prepare Tokio v1.19.1 (#4750) 2022-06-05 13:28:42 +02:00
Alice Ryhl
674d77d4ef
chore: prepare Tokio v1.19.0 (#4738) 2022-06-03 20:41:16 +02:00
Alice Ryhl
4941fbf7c4
tokio: add 1.18.x as LTS release (#4733) 2022-06-02 12:57:05 +02:00
Sabrina Jewson
593b042f7b
docs: mention that Clippy must be run with the MSRV (#4676)
## Motivation

In #4675 I learnt the hard way that Tokio uses Clippy on its MSRV. 

## Solution

Document this in the contributor's guide.
2022-05-10 17:53:43 +00:00
Alice Ryhl
7aa1566cde chore: prepare Tokio v1.18.2 2022-05-08 21:41:15 +02:00
Alice Ryhl
148bea82ee
tokio: prepare Tokio v1.18.1 (#4650) 2022-05-02 17:07:27 +02:00
Eliza Weisman
d456706528
util: implement JoinMap (#4640)
## Motivation

In many cases, it is desirable to spawn a set of tasks associated with
keys, with the ability to cancel them by key. As an example use case for
this sort of thing, see Tower's [`ReadyCache` type][1].

Now that PR #4530 adds a way of cancelling tasks in a
`tokio::task::JoinSet`, we can implement a map-like API based on the
same `IdleNotifiedSet` primitive.

## Solution

This PR adds an implementation of a `JoinMap` type to
`tokio_util::task`, using the `JoinSet` type from `tokio::task`, the
`AbortHandle` type added in #4530, and the new task IDs added in #4630.

Individual tasks can be aborted by key using the `JoinMap::abort`
method, and a set of tasks whose key match a given predicate can be
aborted using `JoinMap::abort_matching`.

When tasks complete, `JoinMap::join_one` returns their associated key
alongside the output from the spawned future, or the key and the
`JoinError` if the task did not complete successfully.

Overall, I think the way this works is pretty straightforward; much of
this PR is just API boilerplate to implement the union of applicable
APIs from `JoinSet` and `HashMap`. Unlike previous iterations on the
`JoinMap` API (e.g. #4538), this version is implemented entirely in
`tokio_util`, using only public APIs from the `tokio` crate. Currently,
the required `tokio` APIs are unstable, but implementing `JoinMap` in
`tokio-util` means we will never have to make stability commitments for
the `JoinMap` API itself.

[1]: https://github.com/tower-rs/tower/blob/master/tower/src/ready_cache/cache.rs

Signed-off-by: Eliza Weisman <eliza@buoyant.io>
2022-04-26 17:25:48 +00:00
Eliza Weisman
43c224ff47
chore: prepare Tokio v1.17.0 release (#4504)
# 1.17.0 (February 16, 2022)

This release updates the minimum supported Rust version (MSRV) to 1.49,
the `mio` dependency to v0.8, and the (optional) `parking_lot`
dependency to v0.12. Additionally, it contains several bug fixes, as
well as internal refactoring and performance improvements.

### Fixed

- time: prevent panicking in `sleep` with large durations ([#4495])
- time: eliminate potential panics in `Instant` arithmetic on platforms
  where `Instant::now` is not monotonic ([#4461])
- io: fix `DuplexStream` not participating in cooperative yielding
  ([#4478])
- rt: fix potential double panic when dropping a `JoinHandle` ([#4430])

### Changed

- update minimum supported Rust version to 1.49 ([#4457])
- update `parking_lot` dependency to v0.12.0 ([#4459])
- update `mio` dependency to v0.8 ([#4449])
- rt: remove an unnecessary lock in the blocking pool ([#4436])
- rt: remove an unnecessary enum in the basic scheduler ([#4462])
- time: use bit manipulation instead of modulo to improve performance
  ([#4480])
- net: use `std::future::Ready` instead of our own `Ready` future
  ([#4271])
- replace deprecated `atomic::spin_loop_hint` with `hint::spin_loop`
  ([#4491])
- fix miri failures in intrusive linked lists ([#4397])

### Documented

- io: add an example for `tokio::process::ChildStdin` ([#4479])

### Unstable

The following changes only apply when building with `--cfg
tokio_unstable`:

- task: fix missing location information in `tracing` spans generated by
  `spawn_local` ([#4483])
- task: add `JoinSet` for managing sets of tasks ([#4335])
- metrics: fix compilation error on MIPS ([#4475])
- metrics: fix compilation error on arm32v7 ([#4453])

[#4495]: https://github.com/tokio-rs/tokio/pull/4495
[#4461]: https://github.com/tokio-rs/tokio/pull/4461
[#4478]: https://github.com/tokio-rs/tokio/pull/4478
[#4430]: https://github.com/tokio-rs/tokio/pull/4430
[#4457]: https://github.com/tokio-rs/tokio/pull/4457
[#4459]: https://github.com/tokio-rs/tokio/pull/4459
[#4449]: https://github.com/tokio-rs/tokio/pull/4449
[#4462]: https://github.com/tokio-rs/tokio/pull/4462
[#4436]: https://github.com/tokio-rs/tokio/pull/4436
[#4480]: https://github.com/tokio-rs/tokio/pull/4480
[#4271]: https://github.com/tokio-rs/tokio/pull/4271
[#4491]: https://github.com/tokio-rs/tokio/pull/4491
[#4397]: https://github.com/tokio-rs/tokio/pull/4397
[#4479]: https://github.com/tokio-rs/tokio/pull/4479
[#4483]: https://github.com/tokio-rs/tokio/pull/4483
[#4335]: https://github.com/tokio-rs/tokio/pull/4335
[#4475]: https://github.com/tokio-rs/tokio/pull/4475
[#4453]: https://github.com/tokio-rs/tokio/pull/4453
2022-02-16 10:50:22 -08:00
Carl Lerche
49fff47111
chore: increase MSRV to 1.49. (#4457)
Rust 1.49 was released on December 31, 2020, which meets our MSRV policy
of a minimum of 6 months.
2022-01-31 13:26:12 -08:00
Alice Ryhl
91b9850505
chore: prepare Tokio v1.16.1 release (#4438) 2022-01-28 10:30:23 +01:00