aboutsummaryrefslogtreecommitdiff
path: root/controller/src/lib.rs
diff options
context:
space:
mode:
Diffstat (limited to 'controller/src/lib.rs')
-rw-r--r--controller/src/lib.rs2
1 files changed, 2 insertions, 0 deletions
diff --git a/controller/src/lib.rs b/controller/src/lib.rs
index e5d19ca..c74ff3f 100644
--- a/controller/src/lib.rs
+++ b/controller/src/lib.rs
@@ -507,6 +507,7 @@ impl ComputePool {
// Send the job to the IO thread, which will send it to a round-robin worker
self.runtime.block_on(self.outbound.send(Outbound::NewJob(jobid, input))).iores()?;
+ self.num_running += 1;
Ok(())
}
@@ -519,6 +520,7 @@ impl ComputePool {
if self.num_running > 0 {
match self.runtime.block_on(self.inbound.recv()) {
Some(Inbound::Completion(event)) => {
+ self.num_running -= 1;
Ok(Some(event))
},
None => Err("IO thread unexpectedly quit".ioerr()),