123 Commits

Author SHA1 Message Date
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
Carl Lerche
afd2189eec
chore: prepare Tokio v1.16 release (#4431) 2022-01-27 15:16:08 -08:00
Carl Lerche
f64673580d
chore: prepare Tokio v1.15.0 release (#4320)
Includes `tokio-macros` v1.7.0
2021-12-15 10:36:09 -08:00
Alice Ryhl
65fb0210d5
tokio: add 1.14.x to LTS releases (#4273) 2021-11-24 09:18:50 +01:00
Taiki Endo
cf3206842c
chore: bump MSRV to 1.46 (#4254) 2021-11-23 12:09:24 +09:00
Eliza Weisman
884a9a4b18
chore: prepare Tokio v1.14.0 (#4234)
# 1.14.0 (November 15, 2021)

### Fixed

- macros: fix compiler errors when using `mut` patterns in `select!`
  ([#4211])
- sync: fix a data race between `oneshot::Sender::send` and awaiting a
  `oneshot::Receiver` when the oneshot has been closed ([#4226])
- sync: make `AtomicWaker` panic safe ([#3689])
- runtime: fix basic scheduler dropping tasks outside a runtime context
  ([#4213])

### Added

- stats: add `RuntimeStats::busy_duration_total` ([#4179], [#4223])

### Changed

- io: updated `copy` buffer size to match `std::io::copy` ([#4209])

### Documented

- io: rename buffer to file in doc-test ([#4230])
- sync: fix Notify example ([#4212])

[#4211]: https://github.com/tokio-rs/tokio/pull/4211
[#4226]: https://github.com/tokio-rs/tokio/pull/4226
[#3689]: https://github.com/tokio-rs/tokio/pull/3689
[#4213]: https://github.com/tokio-rs/tokio/pull/4213
[#4179]: https://github.com/tokio-rs/tokio/pull/4179
[#4223]: https://github.com/tokio-rs/tokio/pull/4223
[#4209]: https://github.com/tokio-rs/tokio/pull/4209
[#4230]: https://github.com/tokio-rs/tokio/pull/4230
[#4212]: https://github.com/tokio-rs/tokio/pull/4212
2021-11-15 16:39:09 -08:00
Eliza Weisman
e0be45e49b
Merge v1.13.1 (#4236)
Refs: #4235
2021-11-15 16:09:33 -08:00
Alice Ryhl
ac89d8926d
chore: prepare Tokio v1.13.0 (#4196) 2021-10-29 18:34:13 +02:00
Alice Ryhl
1ed89aa5cf
chore: prepare Tokio v1.12.0 (#4123) 2021-09-21 17:15:22 +02:00
Alice Ryhl
9a97eb36bc
chore: prepare Tokio v1.11.0 (#4083) 2021-08-31 23:26:42 +02:00
Alice Ryhl
dd060b16f5 chore: prepare Tokio v1.10.1 2021-08-24 17:48:25 +02:00
Alice Ryhl
c0974bad94
chore: prepare Tokio v1.10.0 (#4038) 2021-08-12 21:55:48 +02:00
Alice Ryhl
df10b68d47
readme: add release schedule and bugfix policy (#3948) 2021-07-22 13:53:43 +02:00
Alice Ryhl
b280c6dcd7
chore: prepare Tokio v1.9.0 (#3961) 2021-07-22 12:05:39 +02:00
Alice Ryhl
677107d8d9
chore: prepare Tokio v1.8.0 (#3912) 2021-07-02 22:21:10 +02:00
Alice Ryhl
34c6a26c01
chore: prepare Tokio v1.7.0 (#3863) 2021-06-15 19:39:33 +02:00
Bart Pelle
f759240254
chore: update version in README.md (#3851) 2021-06-11 11:01:22 +02:00
GITSRC
5ed84e1cd8
doc: update README.md (#3806) 2021-05-21 09:55:53 +02:00
Taiki Endo
312321cbd3 chore: enable syntax highlighting for toml in readme 2021-05-09 16:21:36 +02:00
baoyachi. Aka Rust Hairy crabs
cab4a592ac
chore: update version in README.md (#3698) 2021-04-13 16:17:14 +09:00
Lucas Zanela
0074b963b8
doc: add features = "full" to readme (#3680) 2021-04-06 11:03:21 +02:00
Carl Lerche
a66017f049
chore: prepare Tokio 1.0 release (#3319) 2020-12-23 09:26:14 -08:00
Alice Ryhl
78f2340d25
tokio: remove prelude (#3299)
Closes: #3257
2020-12-19 11:42:24 -08:00
Carl Lerche
bbc8eb0f91
chore: update CI badge (#3091) 2020-11-03 09:17:47 +01:00
nickelc
e31bd321ef
readme: update the MSRV to 1.45 (#3048) 2020-10-26 09:46:15 +01:00
Blas Rodriguez Irizar
08872c55d1
doc: feature flags in README (#2682) 2020-07-24 20:51:34 +02:00
Alice Ryhl
b5d2b0d05b
doc: fix links to new website (#2674) 2020-07-22 20:35:02 -07:00
Alice Ryhl
14723f9786
doc: update links in README.md and CONTRIBUTING.md (#2609) 2020-07-21 15:31:26 -07:00
nasa
6fa40b6e20
doc: Fix readme link (#2370) 2020-04-03 09:00:18 -04:00
Thomas
4213b79461
tokio: fix broken contributing guide link (#2267)
The link to the contributing guide in the tokio sub crate was
referencing a non-existent file. This updates the link to reference
the repo root's CONTRIBUTING.md file.

Fixes: #2266
2020-02-22 21:00:58 -08:00
Wade Mealing
874264a4ef
Correct link to the guide on tokio.rs (#2229)
The current link to tokio.rs/docs 404's.  This change redirects the "guides" link to the docs overview (which may be what was intended).
2020-02-11 10:56:13 -05:00
Lucio Franco
5d82ac2d1e
readme: Add more related tokio projects (#2128) 2020-01-21 10:00:18 -05:00
Lucio Franco
f5c20cd228 chore: update Tokio discord url (#2086) 2020-01-09 20:41:07 -08:00
Alice Ryhl
7ee5542182 doc: fix old notes regarding examples and async/await (#2071) 2020-01-07 15:55:10 -08:00
Dmitrii Goriunov
42c942de14 Fix ROADMAP link (#1981) 2019-12-18 09:54:35 -05:00
Kelly Thomas Kline
efb4b67a54 chore: add roadmap (#1965) 2019-12-16 09:39:49 -08:00
nickelc
5862b9a2e0 chore: fix the outdated example in README (#1930) 2019-12-11 14:12:53 -08:00
Oleg Nosov
942feab040 doc: misc API documentation fixes (#1834) 2019-11-27 12:05:42 -08:00
Artem Vorotnikov
8e83a9f2c3 chore: replace Gitter badge with Discord (#1828) 2019-11-26 16:00:38 -08:00
Carl Lerche
abfa857f09
chore: remove updating note from readme (#1824) 2019-11-26 10:36:17 -08:00