Commit 12d5d049 authored by Vincent Pelletier's avatar Vincent Pelletier

Do not lock in constructor since not even caller can access us.


git-svn-id: https://svn.erp5.org/repos/neo/branches/prototype3@254 71dcc9de-d417-0410-9af5-da40c76e7ee4
parent 4ae6bce6
......@@ -337,11 +337,7 @@ class MTClientConnection(ClientConnection):
lock = RLock()
self.acquire = lock.acquire
self.release = lock.release
try:
self.lock()
super(MTClientConnection, self).__init__(*args, **kwargs)
finally:
self.unlock()
super(MTClientConnection, self).__init__(*args, **kwargs)
def lock(self, blocking = 1):
return self.acquire(blocking = blocking)
......@@ -355,11 +351,7 @@ class MTServerConnection(ServerConnection):
lock = RLock()
self.acquire = lock.acquire
self.release = lock.release
try:
self.lock()
super(MTServerConnection, self).__init__(*args, **kwargs)
finally:
self.unlock()
super(MTServerConnection, self).__init__(*args, **kwargs)
def lock(self, blocking = 1):
return self.acquire(blocking = blocking)
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment