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): ...@@ -337,11 +337,7 @@ class MTClientConnection(ClientConnection):
lock = RLock() lock = RLock()
self.acquire = lock.acquire self.acquire = lock.acquire
self.release = lock.release self.release = lock.release
try: super(MTClientConnection, self).__init__(*args, **kwargs)
self.lock()
super(MTClientConnection, self).__init__(*args, **kwargs)
finally:
self.unlock()
def lock(self, blocking = 1): def lock(self, blocking = 1):
return self.acquire(blocking = blocking) return self.acquire(blocking = blocking)
...@@ -355,11 +351,7 @@ class MTServerConnection(ServerConnection): ...@@ -355,11 +351,7 @@ class MTServerConnection(ServerConnection):
lock = RLock() lock = RLock()
self.acquire = lock.acquire self.acquire = lock.acquire
self.release = lock.release self.release = lock.release
try: super(MTServerConnection, self).__init__(*args, **kwargs)
self.lock()
super(MTServerConnection, self).__init__(*args, **kwargs)
finally:
self.unlock()
def lock(self, blocking = 1): def lock(self, blocking = 1):
return self.acquire(blocking = blocking) 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