mirror of
https://github.com/tokio-rs/tokio.git
synced 2026-08-25 00:00:18 +02:00
Merge 'tokio-1.38.1' into 'master' (#6689)
This commit is contained in:
@@ -56,7 +56,7 @@ Make sure you activated the full features of the tokio crate on Cargo.toml:
|
||||
|
||||
```toml
|
||||
[dependencies]
|
||||
tokio = { version = "1.38.0", features = ["full"] }
|
||||
tokio = { version = "1.38.1", features = ["full"] }
|
||||
```
|
||||
Then, on your main.rs:
|
||||
|
||||
|
||||
@@ -1,3 +1,15 @@
|
||||
# 1.38.1 (July 16th, 2024)
|
||||
|
||||
This release fixes the bug identified as ([#6682]), which caused timers not
|
||||
to fire when they should.
|
||||
|
||||
### Fixed
|
||||
|
||||
- time: update `wake_up` while holding all the locks of sharded time wheels ([#6683])
|
||||
|
||||
[#6682]: https://github.com/tokio-rs/tokio/pull/6682
|
||||
[#6683]: https://github.com/tokio-rs/tokio/pull/6683
|
||||
|
||||
# 1.38.0 (May 30th, 2024)
|
||||
|
||||
This release marks the beginning of stabilization for runtime metrics. It
|
||||
|
||||
+1
-1
@@ -6,7 +6,7 @@ name = "tokio"
|
||||
# - README.md
|
||||
# - Update CHANGELOG.md.
|
||||
# - Create "v1.x.y" git tag.
|
||||
version = "1.38.0"
|
||||
version = "1.38.1"
|
||||
edition = "2021"
|
||||
rust-version = "1.63"
|
||||
authors = ["Tokio Contributors <[email protected]>"]
|
||||
|
||||
+1
-1
@@ -56,7 +56,7 @@ Make sure you activated the full features of the tokio crate on Cargo.toml:
|
||||
|
||||
```toml
|
||||
[dependencies]
|
||||
tokio = { version = "1.38.0", features = ["full"] }
|
||||
tokio = { version = "1.38.1", features = ["full"] }
|
||||
```
|
||||
Then, on your main.rs:
|
||||
|
||||
|
||||
@@ -190,11 +190,13 @@ impl Driver {
|
||||
assert!(!handle.is_shutdown());
|
||||
|
||||
// Finds out the min expiration time to park.
|
||||
let expiration_time = (0..rt_handle.time().inner.get_shard_size())
|
||||
.filter_map(|id| {
|
||||
let lock = rt_handle.time().inner.lock_sharded_wheel(id);
|
||||
lock.next_expiration_time()
|
||||
})
|
||||
let locks = (0..rt_handle.time().inner.get_shard_size())
|
||||
.map(|id| rt_handle.time().inner.lock_sharded_wheel(id))
|
||||
.collect::<Vec<_>>();
|
||||
|
||||
let expiration_time = locks
|
||||
.iter()
|
||||
.filter_map(|lock| lock.next_expiration_time())
|
||||
.min();
|
||||
|
||||
rt_handle
|
||||
@@ -203,6 +205,9 @@ impl Driver {
|
||||
.next_wake
|
||||
.store(next_wake_time(expiration_time));
|
||||
|
||||
// Safety: After updating the `next_wake`, we drop all the locks.
|
||||
drop(locks);
|
||||
|
||||
match expiration_time {
|
||||
Some(when) => {
|
||||
let now = handle.time_source.now(rt_handle.clock());
|
||||
|
||||
Reference in New Issue
Block a user