Skip to content

Commit

Permalink
save
Browse files Browse the repository at this point in the history
  • Loading branch information
ryoqun committed Sep 14, 2024
1 parent c45a613 commit c625fda
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion unified-scheduler-pool/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -329,7 +329,9 @@ where
// This fn needs to return immediately due to being part of the blocking
// `::wait_for_termination()` call.
fn return_scheduler(&self, scheduler: S::Inner, id: u64, should_trash: bool) {
let bp_id: u64 = self.block_producing_scheduler_inner.lock().unwrap().0;
if should_trash {
assert!(id != bp_id);
// Delay drop()-ing this trashed returned scheduler inner by stashing it in
// self.trashed_scheduler_inners, which is periodically drained by the `solScCleaner`
// thread. Dropping it could take long time (in fact,
Expand All @@ -339,7 +341,6 @@ where
.expect("not poisoned")
.push(scheduler);
} else {
let bp_id: u64 = self.block_producing_scheduler_inner.lock().unwrap().0;
if id != bp_id {
self.scheduler_inners
.lock()
Expand Down

0 comments on commit c625fda

Please sign in to comment.