Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Updating the tokio dependencies to support an older version #291

Merged
merged 1 commit into from
Nov 26, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 3 additions & 3 deletions ractor/Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[package]
name = "ractor"
version = "0.13.0"
version = "0.13.1"
authors = ["Sean Lawlor", "Evan Au", "Dillon George"]
description = "A actor framework for Rust"
documentation = "https://docs.rs/ractor"
Expand Down Expand Up @@ -36,7 +36,7 @@ strum = { version = "0.26", features = ["derive"] }
# Tracing feature requires --cfg=tokio_unstable
async-std = { version = "1", features = ["attributes"], optional = true }
async-trait = { version = "0.1", optional = true }
tokio = { version = "1.40", features = ["sync"] }
tokio = { version = "1.30", features = ["sync"] }
tracing = { version = "0.1", features = ["attributes"] }

## Blanket Serde
Expand All @@ -50,7 +50,7 @@ function_name = "0.3"
paste = "1"
serial_test = "3.0.0"
rand = "0.8"
tokio = { version = "1", features = ["rt", "time", "sync", "macros", "rt-multi-thread", "tracing"] }
tokio = { version = "1.30", features = ["rt", "time", "sync", "macros", "rt-multi-thread", "tracing"] }
tracing-glog = "0.4"
tracing-subscriber = { version = "0.3", features = ["env-filter"]}
tracing-test = "0.2"
Expand Down
18 changes: 16 additions & 2 deletions ractor/src/actor/supervision.rs
Original file line number Diff line number Diff line change
Expand Up @@ -89,7 +89,14 @@ impl SupervisionTree {
let ltimeout = timeout;
js.spawn(async move { cell.stop_and_wait(lreason, ltimeout).await });
}
_ = js.join_all().await;
// drain the tasks
while let Some(res) = js.join_next().await {
match res {
Err(err) if err.is_panic() => std::panic::resume_unwind(err.into_panic()),
Err(err) => panic!("{err}"),
_ => {}
}
}
}

/// Drain all the linked children, but does NOT unlink them
Expand All @@ -103,7 +110,14 @@ impl SupervisionTree {
let ltimeout = timeout;
js.spawn(async move { cell.drain_and_wait(ltimeout).await });
}
_ = js.join_all().await;
// drain the tasks
while let Some(res) = js.join_next().await {
match res {
Err(err) if err.is_panic() => std::panic::resume_unwind(err.into_panic()),
Err(err) => panic!("{err}"),
_ => {}
}
}
}

/// Determine if the specified actor is a parent of this actor
Expand Down
6 changes: 3 additions & 3 deletions ractor_cluster/Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[package]
name = "ractor_cluster"
version = "0.13.0"
version = "0.13.1"
authors = ["Sean Lawlor", "Evan Au", "Dillon George"]
description = "Distributed cluster environment of Ractor actors"
documentation = "https://docs.rs/ractor"
Expand All @@ -27,9 +27,9 @@ ractor = { version = "0.13.0", features = ["cluster"], path = "../ractor" }
ractor_cluster_derive = { version = "0.13.0", path = "../ractor_cluster_derive" }
rand = "0.8"
sha2 = "0.10"
tokio = { version = "1", features = ["rt", "time", "sync", "macros", "net", "io-util", "tracing"]}
tokio = { version = "1.30", features = ["rt", "time", "sync", "macros", "net", "io-util", "tracing"]}
tokio-rustls = { version = "0.26" }
tracing = "0.1"

[dev-dependencies]
tokio = { version = "1", features = ["rt", "time", "sync", "macros", "net", "io-util", "rt-multi-thread"] }
tokio = { version = "1.30", features = ["rt", "time", "sync", "macros", "net", "io-util", "rt-multi-thread"] }
2 changes: 1 addition & 1 deletion ractor_cluster_derive/Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[package]
name = "ractor_cluster_derive"
version = "0.13.0"
version = "0.13.1"
authors = ["Sean Lawlor <[email protected]>"]
description = "Derives for ractor_cluster"
license = "MIT"
Expand Down
Loading