refactoring: simplify the semaphorewait logic
The semaphorewait()/waitforthread() logic is usefull for IMAP starting connections. We actually use it in imapserver only. This patch removes the over-engineered factorized methods. It tend to simplify the code by cleaning out a chain of two direct calls with no other processes. Reviewed-by: Sebastian Spaeth <Sebastian@SSpaeth.de> Signed-off-by: Nicolas Sebrecht <nicolas.s-dev@laposte.net>
This commit is contained in:
@ -42,10 +42,6 @@ def semaphorereset(semaphore, originalstate):
|
||||
for i in range(originalstate):
|
||||
semaphore.release()
|
||||
|
||||
def semaphorewait(semaphore):
|
||||
semaphore.acquire()
|
||||
semaphore.release()
|
||||
|
||||
class threadlist:
|
||||
def __init__(self):
|
||||
self.lock = Lock()
|
||||
|
Reference in New Issue
Block a user