Commit Graph
357 Commits
Author SHA1 Message Date
Paolo Barbolini b3ff911c38 io: use Buf::put_bytes in Repeat read impl (#7055) 2024-12-30 13:44:55 +01:00
Rain aa7e0cef72 signal: add support for realtime signals on illumos (#7029)
The API was added in libc 0.2.168.

Also added a test for realtime signals.
2024-12-13 22:32:34 -06:00
Hayden Stainsby b5c227d51f tracing: move tracing instrumentation tests into tokio tests (#7007)
In #6112, tests for the tracing instrumentation were introduced. They
had to live in their own test crate under `tokio/tests` because the
`tracing-mock` crate that the tests use had not yet been published to
crates.io.

Now `tracing-mock` has been published to crates.io and so the separate
test crate and separate job to run it are no longer necessary. The
tracing instrumentation tests can be placed in with the other
integration tests in the `tokio` crate.

The tests themselves have also been updated to match the changes in the
`tracing-mock` API since the version which was being used.
2024-12-04 07:47:48 +01:00
Alice Ryhl bb9d57017e chore: prepare Tokio v1.42.0 (#7005) 2024-12-03 14:48:39 +01:00
Alice Ryhl bb7ca7507b chore: prepare Tokio v1.41.1 (#6959)
Signed-off-by: Alice Ryhl <[email protected]>
2024-11-07 11:56:09 +01:00
Motoyuki Kimura 01e04daaa1 chore: prepare Tokio v1.41.0 (#6917) 2024-10-22 11:22:33 +02:00
Russell Cohen da745ff335 metrics: add H2 Histogram option to improve histogram granularity (#6897) 2024-10-21 14:05:45 +02:00
Hayden Stainsby c3a935541d task: add task size to tracing instrumentation (#6881)
In Tokio, the futures for tasks are stored on the stack unless they are
explicitly boxed, either by the user or auto-boxed by Tokio when they
are especially large. Auto-boxing now also occurs in release mode
(since #6826).

Having very large futures can be problematic as it can cause a stack
overflow. In some cases it might be desireable to have smaller futures,
even if they are placed on the heap.

This change adds the size of the future driving an async task or the
function driving a blocking task to the tracing instrumentation. In the
case of a future that is auto-boxed by Tokio, both the final size as well
the original size before boxing is included.

To do this, a new struct `SpawnMeta` gets passed down from where a
future might get boxed to where the instrumentation is added. This
contains the task name (optionally) and the original future or function
size. If the `tokio_unstable` cfg flag and the `tracing` feature aren't both
enabled, then this struct will be zero sized, which is a small improvement
on the previous behavior of unconditionally passing down an `Option<&str>`
for the name.

This will make this information immediately available in Tokio Console,
and will enable new lints which will warn users if they have large futures
(just for async tasks).

We have some tests under the `tracing-instrumentation` crate which test
that the `size.bytes` and `original_size.bytes` fields are set correctly.

The minimal version of `tracing` required for Tokio has been bumped from
0.1.25 to 0.1.29 to get the `Value` impl on `Option<T>`. Given that the current
version is 0.1.40, this seems reasonable, especially given that Tracing's MSRV
is still lower than Tokio's in the latest version.
2024-10-08 10:51:03 +02:00
Motoyuki Kimura ea6d652a10 chore: prepare Tokio v1.40.0 (#6806) 2024-08-30 10:03:16 +02:00
Motoyuki Kimura 3d439ab711 chore: prepare Tokio v1.39.3 (#6782) 2024-08-17 10:26:43 +02:00
Alice Ryhl f602eae499 chore: prepare Tokio v1.39.2 (#6730) 2024-07-27 12:36:48 +02:00
Alice Ryhl f8fe0ffb23 chore: prepare Tokio v1.39.1 (#6716) 2024-07-23 18:28:04 +02:00
Alice Ryhl 48e35c11d9 chore: release Tokio v1.39.0 (#6711) 2024-07-23 15:30:11 +02:00
Alice Ryhl 6a1a7b1591 chore: prepare tokio-macros v2.4.0 (#6707) 2024-07-23 14:45:06 +02:00
Kenny Kerr 51b03f0334 deps: update to windows-sys v0.52 (#6154) 2024-07-23 14:43:23 +02:00
Thomas de Zeeuw 754a1fb03c deps: update to Mio v1 (#6635) 2024-07-23 14:26:07 +02:00
Tim Vilgot Mikael Fredenberg feb742c58e chore: replace num_cpus with available_parallelism (#6709) 2024-07-22 23:15:23 +02:00
Alice Ryhl 15cd5146d4 chore: increase MSRV to 1.70 (#6645) 2024-07-22 18:01:27 +00:00
Weijia Jiang 14b9f71157 chore: release Tokio v1.38.1 (#6688) 2024-07-16 17:16:29 +02:00
Alice Ryhl 14c17fc096 chore: prepare Tokio v1.38.0 (#6601) 2024-05-30 13:24:58 -07:00
Alice Ryhl 65cbf730de chore: prepare tokio-macros v2.3.0 (#6600) 2024-05-30 13:21:51 -07:00
Alan SomersandFrederick Mayle 12920cea45 tests: update nix and mio-aio dependencies (#6552)
nix 0.29.0 and mio-aio 0.9.0 use I/O Safety.

Co-authored-by: Frederick Mayle <[email protected]>
2024-05-25 17:30:36 +02:00
Alice Ryhl 9c337ca1a3 chore: prepare Tokio v1.37.0 (#6435) 2024-03-28 17:34:42 +01:00
M.Amin Rayej eaf81ed324 chore: prepare Tokio v1.36.0 (#6312) 2024-02-02 11:13:46 +00:00
Taiki Endo 9780bf491f ci: update cargo-check-external-types to 0.1.10 (#6274) 2024-01-07 00:53:08 +09:00
Alan Somers e929d0e8b9 tests: update mio-aio to 0.8 (#6269)
This is a test-only dependency.  The main reason for the update is to
avoid transitively depending on a Nix version with a CVE.

mio-aio 0.8.0 has a substantially different API than 0.7.0.  Notably, it
no longer includes any lio_listio functionality.  So to test Tokio's
handling of EVFILT_LIO events we must go low-level and call
libc::lio_listio directly.
2024-01-06 11:14:32 +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
Andrew Walbran a0a58d7edd tokio: update nix dependency to 0.27.1 (#6190) 2023-12-04 16:09:58 +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
Nikolay Arhipov f3949cc56d tokio: added vita target support (#6094) 2023-10-25 14:44:41 +02:00
Tymoteusz Wiśniewski 0457690d01 chore: prepare Tokio v1.33.0 release (#6059) 2023-10-09 11:55:17 +02:00
Jack Wrenn 95fb599664 tokio: render taskdump documentation on docs.rs (#5972)
Modifies `package.metadata.docs.r` so that `--cfg tokio_taskdump`
is used by docs.rs when building documentation.
2023-09-02 11:43:31 +02:00
Alice Ryhl b45f5831cf tokio: remove stats feature (#5952) 2023-08-26 17:09:33 +02:00
Carl Lerche a7d52c2fed chore: prepare Tokio v1.32.0 release (#5937) 2023-08-16 14:11:30 -07: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
Consoli 51cffbb74f time: mark Sleep as !Unpin in docs (#5916) 2023-08-06 13:34:08 +02:00
Carl Lerche 8832e936b1 rt(alt): fix a number of concurrency bugs (#5907)
Expands loom coverage and fixes a number of bugs.

Closes #5888
2023-08-04 11:59:38 -07:00
Jiahao XU c445e467ce tokio: bump MSRV to 1.63 (#5887) 2023-07-27 10:57:19 +02:00
Carl Lerche 4165601b1b rt: initial implementation of new threaded runtime (#5823)
This patch includes an initial implementation of a new multi-threaded
runtime. The new runtime aims to increase the scheduler throughput by
speeding up how it dispatches work to peer worker threads. This
implementation improves most benchmarks by about ~10% when the number of
threads is below 16. As threads increase, mutex contention deteriorates
performance.

Because the new scheduler is not yet ready to replace the old one, the
patch introduces it as an unstable runtime flavor with a warning that it
isn't production ready. Work to improve the scalability of the runtime
will most likely require more intrusive changes across Tokio, so I am
opting to merge with master to avoid larger conflicts.
2023-07-21 11:56:34 -07: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
Andrew Mackenzie 00af6eff77 net: add support for Redox OS (#5790) 2023-06-13 12:42:40 +02:00
Taiki Endo c5d52c17ae chore: enable cargo v2 resolver to prevent dev-deps from enabling log feature of mio (#5787) 2023-06-11 17:34:22 +09:00
Bugen Zhao e63d0f10bf task: use pin-project for TaskLocalFuture (#5758)
Signed-off-by: Bugen Zhao <[email protected]>
2023-06-10 12:38:52 +02:00
Folkert de Vries 7b24b22901 io: support PRIORITY epoll events (#5566)
Add support for epoll priority events. The commit adds `Interest::PRIORITY`, `ready`, and `ready_mut` functions to `AsyncFd`.

Closes #4885
2023-06-06 11:57:20 -07:00
Alice Ryhl 080d52902f Merge 'tokio-1.28.2' into 'master' (#5737) 2023-05-27 20:39:03 +02:00
Alice Ryhl e87ff8a83a chore: prepare Tokio v1.28.2 (#5736) 2023-05-27 20:38:02 +02:00
Alice Ryhl 1605279abf Merge 'tokio-1.25.1' into 'tokio-1.28.x' (#5735) 2023-05-27 20:36:34 +02:00