From 2ae05a6163d8b15f3d8a18a2ab713d1fbd83c505 Mon Sep 17 00:00:00 2001 From: Aleksey Kladov Date: Tue, 18 Dec 2018 13:18:55 +0300 Subject: vfs crate scaffold --- crates/thread_worker/src/lib.rs | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'crates/thread_worker/src/lib.rs') diff --git a/crates/thread_worker/src/lib.rs b/crates/thread_worker/src/lib.rs index e558559ef..24d7fcce1 100644 --- a/crates/thread_worker/src/lib.rs +++ b/crates/thread_worker/src/lib.rs @@ -30,7 +30,7 @@ where impl Worker { /// Stops the worker. Returns the message receiver to fetch results which /// have become ready before the worker is stopped. - pub fn stop(self) -> Receiver { + pub fn shutdown(self) -> Receiver { self.out } @@ -45,11 +45,11 @@ impl WorkerHandle { WorkerHandle { name, thread, - bomb: DropBomb::new(format!("WorkerHandle {} was not stopped", name)), + bomb: DropBomb::new(format!("WorkerHandle {} was not shutdown", name)), } } - pub fn stop(mut self) -> thread::Result<()> { + pub fn shutdown(mut self) -> thread::Result<()> { log::info!("waiting for {} to finish ...", self.name); let name = self.name; self.bomb.defuse(); -- cgit v1.2.3