Skip to content

Commit

Permalink
Rename crate::tokio_unstable to crate::tokio_task
Browse files Browse the repository at this point in the history
  • Loading branch information
Finomnis committed Nov 2, 2024
1 parent 69c92ec commit 01cadd0
Show file tree
Hide file tree
Showing 4 changed files with 4 additions and 6 deletions.
4 changes: 1 addition & 3 deletions src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -113,6 +113,7 @@ mod into_subsystem;
mod runner;
mod signal_handling;
mod subsystem;
mod tokio_task;
mod toplevel;
mod utils;

Expand All @@ -124,6 +125,3 @@ pub use subsystem::SubsystemBuilder;
pub use subsystem::SubsystemFinishedFuture;
pub use subsystem::SubsystemHandle;
pub use toplevel::Toplevel;

mod tokio_unstable;
use tokio_unstable::spawn;
4 changes: 2 additions & 2 deletions src/runner.rs
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ impl SubsystemRunner {
Err: Into<ErrType>,
{
let future = async { run_subsystem(name, subsystem, subsystem_handle, guard).await };
let aborthandle = crate::spawn(future, "subsystem_runner").abort_handle();
let aborthandle = crate::tokio_task::spawn(future, "subsystem_runner").abort_handle();
SubsystemRunner { aborthandle }
}
}
Expand All @@ -57,7 +57,7 @@ async fn run_subsystem<Fut, Subsys, ErrType: ErrTypeTraits, Err>(
let mut redirected_subsystem_handle = subsystem_handle.delayed_clone();

let future = async { subsystem(subsystem_handle).await.map_err(|e| e.into()) };
let join_handle = crate::spawn(future, &name);
let join_handle = crate::tokio_task::spawn(future, &name);

// Abort on drop
guard.on_cancel({
Expand Down
File renamed without changes.
2 changes: 1 addition & 1 deletion src/toplevel.rs
Original file line number Diff line number Diff line change
Expand Up @@ -121,7 +121,7 @@ impl<ErrType: ErrTypeTraits> Toplevel<ErrType> {
pub fn catch_signals(self) -> Self {
let shutdown_token = self.root_handle.get_cancellation_token().clone();

crate::spawn(
crate::tokio_task::spawn(
async move {
wait_for_signal().await;
shutdown_token.cancel();
Expand Down

0 comments on commit 01cadd0

Please sign in to comment.