minor name change in WorkerHandle::stop

This commit is contained in:
fakeshadow 2021-04-05 04:15:12 +08:00
parent f8e8b44638
commit 3c38e1a01f
1 changed files with 2 additions and 5 deletions

View File

@ -98,11 +98,8 @@ impl WorkerHandle {
} }
pub fn stop(&self, graceful: bool) -> oneshot::Receiver<bool> { pub fn stop(&self, graceful: bool) -> oneshot::Receiver<bool> {
let (result, rx) = oneshot::channel(); let (tx, rx) = oneshot::channel();
let _ = self.tx2.send(StopCommand { let _ = self.tx2.send(StopCommand { graceful, tx });
graceful,
tx: result,
});
rx rx
} }
} }