Commit Graph
2562 Commits
Author SHA1 Message Date
Alice Ryhl 2273eb1a1a chore: fix CI on master (#4008) tokio-1.8.4 2021-11-16 12:22:24 -08:00
Alice Ryhl 249f05c0bb chore: fix output of macro after new rustc release (#4189) 2021-11-16 12:22:24 -08:00
Taiki Endo 2bf613206a macros: fix type resolution error in #[tokio::main] (#4176) 2021-11-16 12:22:24 -08:00
Lukas Wirth c9228bf751 macros: make tokio-macros attributes more IDE friendly (#4162) 2021-11-16 12:22:24 -08:00
Fedorenko Dmitrij 441427c993 macros: fix wrong error messages (#4067) 2021-11-16 12:22:24 -08:00
Kateřina Churanová cc7d9e1bbf chore: explicitly relaxed clippy lint for runtime entry macro (#4030) 2021-11-16 12:22:24 -08:00
Blas Rodriguez Irizar f49b7fc6da tokio-macros: compat with clippy::unwrap_used (#3926) 2021-11-16 12:22:24 -08:00
Alan Somers ea87e4ec44 net: fix the uds_datagram tests with the latest nightly stdlib (#3952) 2021-11-16 12:22:24 -08:00
Philip Dubé e2e7b5e0ad examples: replace time crate with httpdate (#4169) 2021-11-16 12:22:24 -08:00
Alan Somers 9a58f7fbe7 tests: update Nix to 0.22.0 (#3951) 2021-11-16 12:22:24 -08:00
Alan Somers 24db3f3d5e fs: reorganize tokio::fs::file's mock tests (#3988) 2021-11-16 12:22:24 -08:00
Taiki Endo 5f24de3978 ci: ignore RUSTSEC-2020-0159 in audit (#4186) 2021-11-16 12:22:24 -08:00
Eliza Weisman 25049c8d1e chore: prepare Tokio v1.8.4 (#4237)
# 1.8.4 (November 15, 2021)

This release backports a bug fix from 1.13.1.

### Fixed

- sync: fix a data race between `oneshot::Sender::send` and awaiting a
  `oneshot::Receiver` when the oneshot has been closed ([#4226])

[#4226]: https://github.com/tokio-rs/tokio/pull/4226
2021-11-16 12:22:24 -08:00
Eliza Weisman 40524ed681 oneshot: document UnsafeCell invariants (#4229)
Depends on #4226

## Motivation

Currently, the safety invariants and synchronization strategy used in
`tokio::sync::oneshot` are not particularly obvious, especially to a new
reader. It would be nice to better document this code to make these
invariants clearer.

## Solution

This branch adds `SAFETY:` comments to the `oneshot` channel
implementation. In particular, I've focused on documenting the
invariants around when the inner `UnsafeCell` that stores the value can
be accessed by the sender and receiver sides of the channel.

I still want to take a closer look at when the waker cells can be set,
and I'd like to add more documentation there in a follow-up branch.

Signed-off-by: Eliza Weisman <[email protected]>
2021-11-16 12:22:24 -08:00
Eliza Weisman e0cf906ae1 sync: fix racy UnsafeCell access on a closed oneshot (#4226) 2021-11-16 12:22:24 -08:00
Alice Ryhl afb734d189 chore: prepare Tokio v1.8.3 (#3983) tokio-1.8.3 2021-07-26 17:35:40 +02:00
Alice Ryhl 1eb468be08 task: fix leak in LocalSet (#3978) 2021-07-22 15:26:31 +02:00
Alice Ryhl 378409d15d runtime: add large test and fix leak it found (#3967) 2021-07-22 15:26:31 +02:00
Alice Ryhl 51ff95c144 chore: use the loom mutex wrapper everywhere (#3958) 2021-07-22 15:26:23 +02:00
Carl Lerche 7147042534 chore: prepare Tokio v1.8.2 release tokio-1.8.2 2021-07-19 11:16:26 -07:00
Diggory Blake 634fcac2d9 runtime: drop future when polling cancelled future (#3965) 2021-07-19 11:16:26 -07:00
Carl Lerche e0c527f383 chore: prepare Tokio v1.8.1 release tokio-1.8.1 2021-07-06 15:37:17 -07:00
Carl Lerche 1160e8864c Merge branch 'tokio-1.7.x' into merge-1.7.2 2021-07-06 15:36:24 -07:00
Carl Lerche 998a125717 chore: prepare Tokio 1.7.2 release tokio-1.7.2 2021-07-06 14:35:36 -07:00
Carl Lerche cbfdc9d69e Merge branch 'tokio-1.6.x' into merge-1.6.3 2021-07-06 14:34:34 -07:00
Carl Lerche 08337c5f79 chore: prepare Tokio v1.6.3 tokio-1.6.3 2021-07-06 13:45:47 -07:00
Carl Lerche 87f4969fbc Merge branch 'tokio-1.5.x' into merge-1.5.x 2021-07-06 13:44:11 -07:00
Alice Ryhl e385108920 rt: remotely abort tasks on JoinHandle::abort (#3934) tokio-1.5.1 2021-07-06 13:41:25 -07:00
Alice Ryhl 677107d8d9 chore: prepare Tokio v1.8.0 (#3912) tokio-1.8.0 2021-07-02 22:21:10 +02:00
Alice Ryhl c8ecfc894d sync: fix watch borrow_and_update (#3913) 2021-07-02 10:14:34 -07:00
Taiki Endo 08ed41f339 chore: fix typos (#3907) 2021-07-01 02:06:56 +09:00
Alice Ryhl 90e1935c48 test: test with tracing (#3906) 2021-06-30 09:40:10 -07:00
Alice Ryhl b877629cb1 net: handle HUP event with UnixStream (#3898)
Fixes: #3879
2021-06-30 09:39:06 -07:00
Mikhail Zabaluev 0531549b6e io: efficient implementation of vectored writes for BufWriter (#3163) 2021-06-29 20:26:47 +02:00
Alice Ryhl 38204f5fba time: fix Timeout size_hint (#3902) 2021-06-29 20:06:10 +02:00
Jacob Rothstein 8fa29cb00a rt: add tokio::task::Builder (#3881)
Adds a builder API for spawning tasks. Initially, this enables the caller to name the spawned
task in order to provide better visibility into all tasks in the system.
2021-06-29 10:47:30 -07:00
Alice Ryhl b521cc2689 doc: document cancellation safety (#3900)
This patch documents cancellation safety. It also moves the "Avoid racy if preconditions"
section in the select! documentation since otherwise the first code block on the page
shows how not to use it, which seems counterintuitive.
2021-06-29 10:35:42 -07:00
Jake Shadle 57c90c9750 net: add read/try_read etc methods to NamedPipeServer (#3899) 2021-06-29 10:05:20 +02:00
Mikail Bagishov d35ff7064f sync: add drop guard for cancellation token (#3839) 2021-06-28 12:34:58 +02:00
Milo ab0791b817 time: add wait alias to sleep (#3897) 2021-06-28 10:48:07 +02:00
Jake Shadle 959c5c997f net: add ready/try methods to NamedPipeClient (#3866) 2021-06-28 10:43:57 +02:00
sb64 845626410a sync: implement From<T> for OnceCell<T> (#3877) 2021-06-22 15:11:01 +02:00
Carl Lerche 3207479fa7 Merge branch 'tokio-1.7.x' into merge-1.7.1 2021-06-18 16:37:21 -07:00
Carl Lerche 7601dc6d2a rt: avoid early task shutdown (#3870)
Tokio 1.7.0 introduced a change intended to eagerly shutdown newly
spawned tasks if the runtime is in the process of shutting down.
However, it introduced a bug where already spawned tasks could be
shutdown too early, resulting in the potential introduction of deadlocks
if tasks acquired mutexes in drop handlers.

Fixes #3869
tokio-1.7.1
2021-06-18 16:32:53 -07:00
Alice Ryhl d1aa2df80e sync: add Receiver::borrow_and_update (#3813) 2021-06-16 18:42:05 +02:00
sb64 e979ad7f2d time: allow users to specify Interval behavior when delayed (#3721) 2021-06-16 13:51:27 +02:00
sb64 5ad3dd3378 time: document auto-advancing behavior of runtime (#3763) 2021-06-16 13:51:12 +02:00
teor 60bd40d529 time: fix typo in Instant::saturating_duration_since docs (#3864) 2021-06-16 12:50:30 +02:00
brain0 4a93af4d25 io: add get_{ref,mut} methods to AsyncFdReadyGuard and AsyncFdReadyMutGuard. (#3807) 2021-06-16 12:45:05 +02:00
Alice Ryhl 34c6a26c01 chore: prepare Tokio v1.7.0 (#3863) tokio-1.7.0 2021-06-15 19:39:33 +02:00