aboutsummaryrefslogtreecommitdiff
path: root/crates/thread_worker/src/lib.rs
diff options
context:
space:
mode:
authorAleksey Kladov <[email protected]>2018-12-18 10:18:55 +0000
committerAleksey Kladov <[email protected]>2018-12-20 09:15:23 +0000
commit2ae05a6163d8b15f3d8a18a2ab713d1fbd83c505 (patch)
tree5d0692d2438ecf5ede416ebbdeab4c9db7c8d5e8 /crates/thread_worker/src/lib.rs
parent7509901fa0985f8fc4893a83e0275a063f072dda (diff)
vfs crate scaffold
Diffstat (limited to 'crates/thread_worker/src/lib.rs')
-rw-r--r--crates/thread_worker/src/lib.rs6
1 files changed, 3 insertions, 3 deletions
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
30impl<I, O> Worker<I, O> { 30impl<I, O> Worker<I, O> {
31 /// Stops the worker. Returns the message receiver to fetch results which 31 /// Stops the worker. Returns the message receiver to fetch results which
32 /// have become ready before the worker is stopped. 32 /// have become ready before the worker is stopped.
33 pub fn stop(self) -> Receiver<O> { 33 pub fn shutdown(self) -> Receiver<O> {
34 self.out 34 self.out
35 } 35 }
36 36
@@ -45,11 +45,11 @@ impl WorkerHandle {
45 WorkerHandle { 45 WorkerHandle {
46 name, 46 name,
47 thread, 47 thread,
48 bomb: DropBomb::new(format!("WorkerHandle {} was not stopped", name)), 48 bomb: DropBomb::new(format!("WorkerHandle {} was not shutdown", name)),
49 } 49 }
50 } 50 }
51 51
52 pub fn stop(mut self) -> thread::Result<()> { 52 pub fn shutdown(mut self) -> thread::Result<()> {
53 log::info!("waiting for {} to finish ...", self.name); 53 log::info!("waiting for {} to finish ...", self.name);
54 let name = self.name; 54 let name = self.name;
55 self.bomb.defuse(); 55 self.bomb.defuse();