2922 Commits

Author SHA1 Message Date
Taiki Endo
a8b662f643
ci: upgrade to new nightly (#4268) 2021-11-23 19:29:57 +09:00
Taiki Endo
cf3206842c
chore: bump MSRV to 1.46 (#4254) 2021-11-23 12:09:24 +09:00
Taiki Endo
8943e8aeef
macros: address remainging clippy::semicolon_if_nothing_returned warning (#4252) 2021-11-22 18:41:17 +09:00
Taiki Endo
fe770dc509
chore: fix newly added warnings (#4253) 2021-11-22 18:40:57 +09:00
Taiki Endo
8b6542fc3e
chore: update nix to 0.23 (#4255) 2021-11-22 06:13:14 +09:00
Alice Ryhl
b1afd95994
sync: elaborate on cross-runtime message passing (#4240) 2021-11-17 16:02:07 +01:00
Alice Ryhl
095b5dcf93
net: add connect_std -> TcpSocket doc alias (#4219) 2021-11-16 22:22:47 +01:00
Alice Ryhl
623c09c52c
chore: prepare tokio-macros 1.6.0 (#4239) tokio-macros-1.6.0 2021-11-16 09:54:07 +01: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
tokio-1.14.0
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
Eliza Weisman
26f0938bf3
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 <eliza@buoyant.io>
2021-11-15 12:46:12 -08:00
Eliza Weisman
4b78ed4d68
sync: fix racy UnsafeCell access on a closed oneshot (#4226) 2021-11-14 18:03:41 +01:00
Shin Seunghun
79d7a625d0
io: rename buffer to file in doc-test (#4230) 2021-11-13 11:31:42 +01:00
Alice Ryhl
ccf855ec24
stats: only expose busy_duration_total (#4223) 2021-11-11 21:53:29 +01:00
Alice Ryhl
579f61106d
ci: check for minimal versions with tokio_unstable (#4224) 2021-11-11 21:53:15 +01:00
Alice Ryhl
f45320a9c0
stats: add busy_duration stats (#4179) 2021-11-08 14:59:36 -05:00
Alice Ryhl
1f8105588c
runtime: drop basic scheduler tasks inside context (#4213) 2021-11-02 23:25:34 +01:00
Alice Ryhl
94ee305741
macros: fix mut patterns in select! macro (#4211) 2021-11-02 18:05:24 +01:00
Alice Ryhl
669bc4476e
io: update copy buffer size (#4209) 2021-11-02 16:22:45 +01:00
Alice Ryhl
1265d0c5dc
sync: fix Notify example (#4212) 2021-11-02 16:22:30 +01:00
John-John Tedro
09b770c5db
sync: make AtomicWaker panic safe (#3689) 2021-11-02 13:41:36 +01:00
Alice Ryhl
d1a400912e
chore: prepare tokio-stream 0.1.8 (#4198) tokio-stream-0.1.8 2021-10-29 18:34:43 +02:00
Alice Ryhl
aa03622cf3
chore: prepare tokio-util 0.6.9 (#4199) tokio-util-0.6.9 2021-10-29 18:34:23 +02:00
Alice Ryhl
ac89d8926d
chore: prepare Tokio v1.13.0 (#4196) tokio-1.13.0 2021-10-29 18:34:13 +02:00
Alice Ryhl
e184205421
chore: prepare tokio-macros 1.6.0 (#4197) tokio-macros-1.5.1 2021-10-29 18:33:40 +02:00
sander2
44a1aad8df
task: allocate callback on heap immediately in debug mode (#4203) 2021-10-29 17:34:25 +02:00
Alice Ryhl
75c07770bf
sync: make watch::send_replace infallible (#4195) 2021-10-27 14:05:25 +02:00
Colin Walters
268ed5e73e
task: add more tips + links to spawn_blocking docs (#4150) 2021-10-26 20:57:57 +02:00
Bhargav
0c68b89452
codec: update stream impl for Framed to return None after Err (#4166) 2021-10-26 16:56:15 +02:00
Alice Ryhl
827694a9e3
ci: fix nightly version for cirrus ci (#4200) 2021-10-26 16:53:05 +02:00
Alice Ryhl
d15e5fad16
ci: split FreeBSD into two jobs (#4194) 2021-10-26 15:44:00 +02:00
Alice Ryhl
9cb495cdb8
tokio: upgrade to new nightly for CI (#4193) 2021-10-26 14:08:11 +02:00
Ibraheem Ahmed
e7d3e0c93c
macros: use qualified syntax when polling in select! (#4192) 2021-10-25 23:54:34 +09:00
Alice Ryhl
e04b5be1f5
time: update deadline on removal in DelayQueue (#4178) 2021-10-22 20:34:36 +02:00
Colin Walters
2734fa9a85
util/io: add SyncIoBridge (#4146) 2021-10-22 18:46:29 +02:00
Alice Ryhl
83aeae8610
chore: fix output of macro after new rustc release (#4189) 2021-10-22 09:36:12 +02:00
Taiki Endo
cf550b2183
ci: ignore RUSTSEC-2020-0159 in audit (#4186) 2021-10-21 10:27:26 +02:00
Colin Walters
e1c8b5a159
tests: add #[cfg(sync)] to watch test (#4183) 2021-10-21 09:11:14 +02:00
Jared Stanbrough
eb7a615c96
tokio: add riscv32 to non atomic64 architectures (#4185) 2021-10-21 04:25:00 +09:00
John-John Tedro
44e9013f64
tokio: assert platform-minimum requirements at build time (#3797) 2021-10-19 15:16:45 +02:00
antogilbert
03969cdae7
doc: conversion of doc comments to indicative mood (#4174)
Co-authored-by: Antonello Palazzi <antonello.palazzi@gmail.com>
2021-10-19 10:54:16 +02:00
Taiki Endo
095012b03b
macros: fix type resolution error in #[tokio::main] (#4176) 2021-10-19 12:49:57 +09:00
Jonathan
b5c1fb4012
signal: add example with background listener (#4171) 2021-10-17 20:37:15 +02:00
Philip Dubé
d4848a9e2e
examples: replace time crate with httpdate (#4169) 2021-10-15 15:21:08 +02:00
Alice Ryhl
bb6a292d0a
chore: prepare tokio-macros v1.5.0 (#4167) tokio-macros-1.5.0 2021-10-13 15:51:09 +02:00
Suika
eb2106f87e
runtime: reset woken of outer future after polled (#4157) 2021-10-12 13:35:14 +02:00
Lukas Wirth
fadd0190da
macros: make tokio-macros attributes more IDE friendly (#4162) 2021-10-11 22:04:47 +02:00
Alice Ryhl
f0cb360d70
sync: add more oneshot examples (#4153) 2021-10-08 08:52:50 +02:00
Alice Ryhl
d047584e86
time: document Interval::tick cancel safety (#4152) 2021-10-05 15:55:15 +02:00
Alice Ryhl
c5d37204dc
chore: fix unused field warnings (#4151) 2021-10-05 13:21:38 +02:00