In a single-threaded process, we do not need to locks
threads against each other.

Signed-off-by: Klaus Aehlig <[email protected]>
---
 lib/jqueue/__init__.py | 8 +-------
 1 file changed, 1 insertion(+), 7 deletions(-)

diff --git a/lib/jqueue/__init__.py b/lib/jqueue/__init__.py
index 09ad889..d321de4 100644
--- a/lib/jqueue/__init__.py
+++ b/lib/jqueue/__init__.py
@@ -195,7 +195,7 @@ class _QueuedJob(object):
   # pylint: disable=W0212
   __slots__ = ["queue", "id", "ops", "log_serial", "ops_iter", "cur_opctx",
                "received_timestamp", "start_timestamp", "end_timestamp",
-               "processor_lock", "writable", "archived",
+               "writable", "archived",
                "livelock", "process_id",
                "__weakref__"]
 
@@ -262,12 +262,6 @@ class _QueuedJob(object):
     obj.ops_iter = None
     obj.cur_opctx = None
 
-    # Read-only jobs are not processed and therefore don't need a lock
-    if writable:
-      obj.processor_lock = threading.Lock()
-    else:
-      obj.processor_lock = None
-
   def __repr__(self):
     status = ["%s.%s" % (self.__class__.__module__, self.__class__.__name__),
               "id=%s" % self.id,
-- 
2.2.0.rc0.207.ga3a616c

Reply via email to