From 0dca5deb0bdfc3bdd25b144e3e3c1d1110e50cec Mon Sep 17 00:00:00 2001 From: Ryo Onodera Date: Sun, 14 Apr 2024 11:45:55 +0900 Subject: [PATCH] Use {crossbeam,chained}_channel::unbounded() --- unified-scheduler-pool/src/lib.rs | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/unified-scheduler-pool/src/lib.rs b/unified-scheduler-pool/src/lib.rs index bafeeae775c6a4..df1f18dc3362b7 100644 --- a/unified-scheduler-pool/src/lib.rs +++ b/unified-scheduler-pool/src/lib.rs @@ -15,7 +15,7 @@ use { assert_matches::assert_matches, - crossbeam_channel::{never, select, unbounded, Receiver, RecvError, SendError, Sender}, + crossbeam_channel::{self, never, select, Receiver, RecvError, SendError, Sender}, dashmap::DashMap, derivative::Derivative, log::*, @@ -415,7 +415,7 @@ impl UsageQueueLoader { // https://github.com/crossbeam-rs/crossbeam/pull/1047) fn disconnected() -> Receiver { // drop the sender residing at .0, returning an always-disconnected receiver. - unbounded().1 + crossbeam_channel::unbounded().1 } fn initialized_result_with_timings() -> ResultWithTimings { @@ -466,8 +466,8 @@ impl PooledScheduler { impl, TH: TaskHandler> ThreadManager { fn new(pool: Arc>) -> Self { - let (new_task_sender, new_task_receiver) = unbounded(); - let (session_result_sender, session_result_receiver) = unbounded(); + let (new_task_sender, new_task_receiver) = crossbeam_channel::unbounded(); + let (session_result_sender, session_result_receiver) = crossbeam_channel::unbounded(); let handler_count = pool.handler_count; Self { @@ -611,11 +611,11 @@ impl, TH: TaskHandler> ThreadManager { // heuristic's caveat for the first task of linearized runs, which is described above. let (mut blocked_task_sender, blocked_task_receiver) = chained_channel::unbounded::(context.clone()); - let (idle_task_sender, idle_task_receiver) = unbounded::(); + let (idle_task_sender, idle_task_receiver) = crossbeam_channel::unbounded::(); let (finished_blocked_task_sender, finished_blocked_task_receiver) = - unbounded::>(); + crossbeam_channel::unbounded::>(); let (finished_idle_task_sender, finished_idle_task_receiver) = - unbounded::>(); + crossbeam_channel::unbounded::>(); let mut result_with_timings = self.session_result_with_timings.take();