Browse Source

system: Use a bounded channel for StoppableTask.

parazyd 3 years ago
parent
commit
a0b73961fb
1 changed files with 1 additions and 1 deletions
  1. 1 1
      src/system/stoppable_task.rs

+ 1 - 1
src/system/stoppable_task.rs

@@ -34,7 +34,7 @@ pub struct StoppableTask {
 
 impl StoppableTask {
     pub fn new() -> Arc<Self> {
-        let (stop_send, stop_recv) = channel::unbounded();
+        let (stop_send, stop_recv) = channel::bounded(1);
         Arc::new(Self { stop_send, stop_recv })
     }