diff --git a/actix-rt/src/arbiter.rs b/actix-rt/src/arbiter.rs index c3307835..6f723111 100644 --- a/actix-rt/src/arbiter.rs +++ b/actix-rt/src/arbiter.rs @@ -147,7 +147,7 @@ impl Arbiter { } /// Sets up an Arbiter runner on the current thread using the provided runtime local task set. - pub(crate) fn new_current_thread(local: &LocalSet) -> ArbiterHandle { + pub(crate) fn in_new_system(local: &LocalSet) -> ArbiterHandle { let (tx, rx) = mpsc::unbounded_channel(); let hnd = ArbiterHandle::new(tx); diff --git a/actix-rt/src/system.rs b/actix-rt/src/system.rs index 41b95f21..d2f38ca8 100644 --- a/actix-rt/src/system.rs +++ b/actix-rt/src/system.rs @@ -36,15 +36,11 @@ impl System { /// Panics if underlying Tokio runtime can not be created. #[allow(clippy::new_ret_no_self)] pub fn new() -> SystemRunner { - Self::create_runtime() - } - - fn create_runtime() -> SystemRunner { let (stop_tx, stop_rx) = oneshot::channel(); let (sys_tx, sys_rx) = mpsc::unbounded_channel(); let rt = Runtime::new().expect("Actix (Tokio) runtime could not be created."); - let system = System::construct(sys_tx, Arbiter::new_current_thread(rt.local_set())); + let system = System::construct(sys_tx, Arbiter::in_new_system(rt.local_set())); // init background system arbiter let sys_ctrl = SystemController::new(sys_rx, stop_tx);