forked from M-Labs/nac3
codegen: minimized lock holding time
The previous way of holding the lock would prohibit multithread code generation for llvm
This commit is contained in:
parent
180392e2ab
commit
f5353419ac
@ -175,9 +175,9 @@ impl WorkerRegistry {
|
||||
}
|
||||
|
||||
// do whatever...
|
||||
let mut lock = self.task_count.lock();
|
||||
module.verify().unwrap();
|
||||
f.run(&module);
|
||||
let mut lock = self.task_count.lock();
|
||||
*lock += 1;
|
||||
self.wait_condvar.notify_all();
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user