Since notify start changes only per-job internal and doesn't interact
with any other thread (there can't be two threads running the same job),
we can acquire the bjl in a shared way.

Signed-off-by: Guido Trotter <[email protected]>
---
 lib/jqueue.py |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/lib/jqueue.py b/lib/jqueue.py
index ae0d4f9..81e2e40 100644
--- a/lib/jqueue.py
+++ b/lib/jqueue.py
@@ -373,7 +373,7 @@ class _OpExecCallbacks(mcpu.OpExecCbBase):
     self._job = job
     self._op = op
 
-  @locking.ssynchronized(_big_jqueue_lock)
+  @locking.ssynchronized(_big_jqueue_lock, shared=1)
   def NotifyStart(self):
     """Mark the opcode as running, not lock-waiting.
 
-- 
1.7.1

Reply via email to