From: Bill Erickson Date: Tue, 7 May 2013 20:29:26 +0000 (-0400) Subject: constrictor shared thread lock X-Git-Url: https://old-git.evergreen-ils.org/?a=commitdiff_plain;h=cba944dec28b9b783c434fbe07d34b6854c64a66;p=working%2Frandom.git constrictor shared thread lock Each script has a thread lock (RLock()) object which can be shared by its threads to manage all its thread locking needs. Signed-off-by: Bill Erickson --- diff --git a/constrictor/script.py b/constrictor/script.py index c690d9433..5ba2cbc74 100644 --- a/constrictor/script.py +++ b/constrictor/script.py @@ -25,6 +25,7 @@ from log import * class Script(object): def __init__(self, name=''): self.name = name + self.lock = threading.RLock() def run(self): log_error('Override Script.run() to run a script!') sys.exit(1)