🎩 You're Invited:Meet the Socket team at Black Hat in Las Vegas, August 3-6.RSVP
Sign In

tokio

Package Overview
Dependencies
Maintainers
1
Versions
195
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

tokio - cargo Package Compare versions

Comparing version
1.51.3
to
1.51.4
+1
-1
.cargo_vcs_info.json
{
"git": {
"sha1": "fd63094ee0d34b4f3f93f59507e91c65919a2d71"
"sha1": "f84b209126a9b0f66dae1025e30e44d217205513"
},
"path_in_vcs": "tokio"
}

@@ -76,5 +76,5 @@ # This file is automatically @generated by Cargo.

name = "autocfg"
version = "1.5.0"
version = "1.5.1"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "c08606f8c3cbf4ce6ec8e28fb0014a2c086708fe954eaa885384a6165172e7e8"
checksum = "f2032f911046de80f0a198e0901378627c33f59ea0ac00e363d481118bd70a53"

@@ -119,5 +119,5 @@ [[package]]

name = "bumpalo"
version = "3.20.2"
version = "3.20.3"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "5d20789868f4b01b2f2caec9f5c4e0213b41e3e5702a50157d699ae31ced2fcb"
checksum = "72f5acc6cb2ba439de613abc23857ec3d78374d8ed5ac84e9d11336e87da8649"

@@ -138,5 +138,5 @@ [[package]]

name = "cc"
version = "1.2.61"
version = "1.2.63"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "d16d90359e986641506914ba71350897565610e87ce0ad9e6f28569db3dd5c6d"
checksum = "556e016178bb5662a08681bbe0f00f8e17631781a4dfc8c45e466e4b185ec27f"
dependencies = [

@@ -352,5 +352,5 @@ "find-msvc-tools",

name = "generator"
version = "0.8.8"
version = "0.8.9"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "52f04ae4152da20c76fe800fa48659201d5cf627c5149ca0b707b69d7eef6cf9"
checksum = "b3b854b0e584ead1a33f18b2fcad7cf7be18b3875c78816b753639aa501513ae"
dependencies = [

@@ -408,5 +408,5 @@ "cc",

name = "hashbrown"
version = "0.17.0"
version = "0.17.1"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "4f467dd6dccf739c208452f8014c75c18bb8301b050ad1cfb27153803edb0f51"
checksum = "ed5909b6e89a2db4456e54cd5f673791d7eca6732202bbf2a9cc504fe2f9b84a"

@@ -432,3 +432,3 @@ [[package]]

"equivalent",
"hashbrown 0.17.0",
"hashbrown 0.17.1",
"serde",

@@ -457,5 +457,5 @@ "serde_core",

name = "js-sys"
version = "0.3.98"
version = "0.3.99"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "67df7112613f8bfd9150013a0314e196f4800d3201ae742489d999db2f979f08"
checksum = "142bc4740e452c1e57ade0cbc129f139c9093e354346f0872ef985f4f5cf5f11"
dependencies = [

@@ -509,5 +509,5 @@ "cfg-if",

name = "log"
version = "0.4.29"
version = "0.4.30"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "5e5032e24019045c762d3c0f28f5b6b8bbf38563a65908389bf7978758920897"
checksum = "616ec5685824bcc94416c6d4a7a446eea774a31efd7062c8480ba6fd06d7a6e5"

@@ -541,5 +541,5 @@ [[package]]

name = "memchr"
version = "2.8.0"
version = "2.8.1"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "f8ca58f447f06ed17d5fc4043ce1b10dd205e060fb3ce5b979b8ed8e59ff3f79"
checksum = "6b947ae49db0d222b1dbc6b113ce7248a3fc3a6ca21b696717bfc000ba4484d8"

@@ -576,5 +576,5 @@ [[package]]

name = "mio"
version = "1.2.0"
version = "1.2.1"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "50b7e5b27aa02a74bac8c3f23f448f8d87ff11f92d3aac1a6ed369ee08cc56c1"
checksum = "02bd0af71c67b473010cbbc60715ee815645a4dc942899111f494b4b737d6fda"
dependencies = [

@@ -709,5 +709,5 @@ "libc",

name = "pin-project"
version = "1.1.12"
version = "1.1.13"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "cbf0d9e68100b3a7989b4901972f265cd542e560a3a8a724e1e20322f4d06ce9"
checksum = "2466b2336ed02bcdca6b294417127b90ec92038d1d5c4fbeac971a922e0e0924"
dependencies = [

@@ -719,5 +719,5 @@ "pin-project-internal",

name = "pin-project-internal"
version = "1.1.12"
version = "1.1.13"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "a990e22f43e84855daf260dded30524ef4a9021cc7541c26540500a50b624389"
checksum = "c96395f0a926bc13b1c17622aaddda1ecb55d49c8f1bf9777e4d877800a43f8b"
dependencies = [

@@ -1001,5 +1001,5 @@ "proc-macro2",

name = "serde_json"
version = "1.0.149"
version = "1.0.150"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "83fc039473c5595ace860d8c4fafa220ff474b3fc6bfdb4293327f1a37e94d86"
checksum = "e8014e44b4736ed0538adeecded0fce2a272f22dc9578a7eb6b2d9993c74cfb9"
dependencies = [

@@ -1024,5 +1024,5 @@ "itoa",

name = "shlex"
version = "1.3.0"
version = "2.0.1"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "0fda2ff0d084019ba4d7c6f371c95d8fd75ce3524c3cb8fb653a3023f6323e64"
checksum = "f8fadd59c855ef2080decdef8ff161eb6661b86933c9d82e5ba29dc602a55aba"

@@ -1053,5 +1053,5 @@ [[package]]

name = "socket2"
version = "0.6.3"
version = "0.6.4"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "3a766e1110788c36f4fa1c2b71b387a7815aa65f88ce0229841826633d93723e"
checksum = "52d1cfed4120b4d927bf7c0f86d2087a4a7d6027c906d9f9d525a80573b9be51"
dependencies = [

@@ -1103,3 +1103,3 @@ "libc",

name = "tokio"
version = "1.51.3"
version = "1.51.4"
dependencies = [

@@ -1139,5 +1139,5 @@ "async-stream",

name = "tokio"
version = "1.52.2"
version = "1.52.3"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "110a78583f19d5cdb2c5ccf321d1290344e71313c6c37d43520d386027d18386"
checksum = "8fc7f01b389ac15039e4dc9531aa973a135d7a4135281b12d7c1bc79fd57fffe"
dependencies = [

@@ -1166,3 +1166,3 @@ "pin-project-lite",

"pin-project-lite",
"tokio 1.52.2",
"tokio 1.52.3",
]

@@ -1177,3 +1177,3 @@

"futures-core",
"tokio 1.52.2",
"tokio 1.52.3",
"tokio-stream",

@@ -1193,3 +1193,3 @@ ]

"pin-project-lite",
"tokio 1.52.2",
"tokio 1.52.3",
]

@@ -1337,5 +1337,5 @@

name = "wasm-bindgen"
version = "0.2.121"
version = "0.2.122"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "49ace1d07c165b0864824eee619580c4689389afa9dc9ed3a4c75040d82e6790"
checksum = "3ed04576f974d2b2fba0f38c51dbc5518011e38c36bf1143164be765528fd409"
dependencies = [

@@ -1351,5 +1351,5 @@ "cfg-if",

name = "wasm-bindgen-futures"
version = "0.4.71"
version = "0.4.72"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "96492d0d3ffba25305a7dc88720d250b1401d7edca02cc3bcd50633b424673b8"
checksum = "9473dbd2991ae90b6291c3c32c30c6187ac49aa32f9905d1cce280ec1e110b0f"
dependencies = [

@@ -1362,5 +1362,5 @@ "js-sys",

name = "wasm-bindgen-macro"
version = "0.2.121"
version = "0.2.122"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "8e68e6f4afd367a562002c05637acb8578ff2dea1943df76afb9e83d177c8578"
checksum = "916151b09da36bd82f6615cbf3a419e2f0ba23a03c6160e8e92eb6bd4aa1dec6"
dependencies = [

@@ -1373,5 +1373,5 @@ "quote",

name = "wasm-bindgen-macro-support"
version = "0.2.121"
version = "0.2.122"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "d95a9ec35c64b2a7cb35d3fead40c4238d0940c86d107136999567a4703259f2"
checksum = "299047362ccbfce148b67ab7e73349f77748e00c8296f9542adfad2ad82c5c5e"
dependencies = [

@@ -1387,5 +1387,5 @@ "bumpalo",

name = "wasm-bindgen-shared"
version = "0.2.121"
version = "0.2.122"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "c4e0100b01e9f0d03189a92b96772a1fb998639d981193d7dbab487302513441"
checksum = "9a929b2c61f11ba3e9bc35b50c1f25cb38e0e892c0c231ae2b8cf78d5dad4437"
dependencies = [

@@ -1397,5 +1397,5 @@ "unicode-ident",

name = "wasm-bindgen-test"
version = "0.3.71"
version = "0.3.72"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "af5ec93229ad9ccd0a545a516dec76dc276613f278f6a91aa6b463d5b33d42d0"
checksum = "74fde991ccdc895cb7fbaa14b137d62af74d9011be67b71c694bfc40edd3119c"
dependencies = [

@@ -1420,5 +1420,5 @@ "async-trait",

name = "wasm-bindgen-test-macro"
version = "0.3.71"
version = "0.3.72"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "3c81b9fef827e575e0e54431736d1baa0d700315d8c62cfef1f61fa3aad0cbeb"
checksum = "e925354648d2a4d1bf205412e36d520a800280622eef4719678d268e5d40e978"
dependencies = [

@@ -1432,5 +1432,5 @@ "proc-macro2",

name = "wasm-bindgen-test-shared"
version = "0.2.121"
version = "0.2.122"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "4f4d8ae7ad5440360e9799dfd42857d126454a88441ddf72d288ef83fa47f527"
checksum = "684365b586a9a6256c1cc3544eee8680de48d6041142f581776ec7b139622ae9"

@@ -1600,5 +1600,5 @@ [[package]]

name = "zerocopy"
version = "0.8.48"
version = "0.8.50"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "eed437bf9d6692032087e337407a86f04cd8d6a16a37199ed57949d415bd68e9"
checksum = "3b065d4f0e55f82fae73202e189638116a87c55ab6b8e6c2721e13dd9d854ad1"
dependencies = [

@@ -1610,5 +1610,5 @@ "zerocopy-derive",

name = "zerocopy-derive"
version = "0.8.48"
version = "0.8.50"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "70e3cd084b1788766f53af483dd21f93881ff30d7320490ec3ef7526d203bad4"
checksum = "0b631b19d36a892ab55420c92dbc83ccd79274f25be714855d3074aa71cab639"
dependencies = [

@@ -1615,0 +1615,0 @@ "proc-macro2",

@@ -16,3 +16,3 @@ # THIS FILE IS AUTOMATICALLY GENERATED BY CARGO

name = "tokio"
version = "1.51.3"
version = "1.51.4"
authors = ["Tokio Contributors <team@tokio.rs>"]

@@ -19,0 +19,0 @@ build = false

@@ -63,3 +63,3 @@ *[TokioConf 2026 program and tickets are now available!](https://tokioconf.com)*

[dependencies]
tokio = { version = "1.51.3", features = ["full"] }
tokio = { version = "1.51.4", features = ["full"] }
```

@@ -66,0 +66,0 @@ Then, on your main.rs:

@@ -388,4 +388,2 @@ use crate::loom::sync::atomic::AtomicBool;

// If `before_park` spawns a task (or otherwise schedules work for us), then we should not
// park the thread.
if !self.has_pending_work(&core) {

@@ -400,2 +398,11 @@ // Park until the thread is signaled

core.submit_metrics(handle);
} else {
// `before_park` scheduled work (e.g. an `on_thread_park` hook that woke the
// `block_on` future), so we don't block. We must still poll the driver once
// without blocking, or timer and I/O events would stall under a runtime driven
// by repeated short `block_on` calls. See
// <https://github.com/tokio-rs/tokio/issues/8212>.
core.submit_metrics(handle);
core = self.park_internal(core, handle, &mut driver, Some(Duration::from_millis(0)));
}

@@ -402,0 +409,0 @@

@@ -7,2 +7,3 @@ #![warn(rust_2018_idioms)]

use std::sync::Arc;
use std::time::Duration;
use tokio::runtime::Builder;

@@ -94,1 +95,50 @@ use tokio::sync::Notify;

}
// Regression test for #8212: a current-thread runtime driven by repeated short
// `block_on` calls, where `on_thread_park` wakes the `block_on` future, must
// still drive the time driver so a spawned timer keeps making progress. Before
// the fix, `before_park` setting the `woken` flag caused `park` to skip the
// driver entirely, so the timer never fired.
#[test]
fn before_park_does_not_stall_spawned_timer() {
let notify = Arc::new(Notify::new());
let task_done = Arc::new(AtomicBool::new(false));
let rt = Builder::new_current_thread()
.enable_all()
.on_thread_park({
let notify = notify.clone();
move || notify.notify_waiters()
})
.build()
.unwrap();
rt.spawn({
let task_done = task_done.clone();
async move {
tokio::time::sleep(Duration::from_millis(1)).await;
task_done.store(true, Ordering::SeqCst);
}
});
// A current-thread runtime only runs tasks while inside `block_on`, so drive it
// once to let the spawned task register its timer.
rt.block_on(tokio::task::yield_now());
// Drive the runtime in short bursts, the way an external event loop would. Each
// burst parks via `on_thread_park` (which wakes the `block_on` future); the fix
// keeps polling the driver so the spawned timer still fires. A regression stalls
// the timer, failing the assert below instead of hanging.
for _ in 0..100 {
if task_done.load(Ordering::SeqCst) {
break;
}
rt.block_on(notify.notified());
std::thread::sleep(Duration::from_millis(1));
}
assert!(
task_done.load(Ordering::SeqCst),
"spawned task's timer never fired (issue #8212)"
);
}

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is too big to display