[Neo-report] r1929 gregory - in /trunk/neo: connection.py tests/testConnection.py
nobody at svn.erp5.org
nobody at svn.erp5.org
Mon Mar 8 21:44:44 CET 2010
Author: gregory
Date: Mon Mar 8 21:44:44 2010
New Revision: 1929
Log:
Remove MTServerConnection.
This class is not used as the only multithreaded node does not accept
incoming connections.
Modified:
trunk/neo/connection.py
trunk/neo/tests/testConnection.py
Modified: trunk/neo/connection.py
==============================================================================
--- trunk/neo/connection.py [iso-8859-1] (original)
+++ trunk/neo/connection.py [iso-8859-1] Mon Mar 8 21:44:44 2010
@@ -632,52 +632,3 @@
finally:
self.release()
-
-class MTServerConnection(ServerConnection):
- """A Multithread-safe version of ServerConnection."""
-
- def __init__(self, *args, **kwargs):
- # _lock is only here for lock debugging purposes. Do not use.
- self._lock = lock = RLock()
- self.acquire = lock.acquire
- self.release = lock.release
- self.lock()
- try:
- super(MTServerConnection, self).__init__(*args, **kwargs)
- finally:
- self.unlock()
-
- def lock(self, blocking = 1):
- return self.acquire(blocking = blocking)
-
- def unlock(self):
- self.release()
-
- @lockCheckWrapper
- def writable(self, *args, **kw):
- return super(MTServerConnection, self).writable(*args, **kw)
-
- @lockCheckWrapper
- def readable(self, *args, **kw):
- return super(MTServerConnection, self).readable(*args, **kw)
-
- @lockCheckWrapper
- def analyse(self, *args, **kw):
- return super(MTServerConnection, self).analyse(*args, **kw)
-
- @lockCheckWrapper
- def notify(self, *args, **kw):
- return super(MTServerConnection, self).notify(*args, **kw)
-
- @lockCheckWrapper
- def ask(self, *args, **kw):
- return super(MTServerConnection, self).ask(*args, **kw)
-
- @lockCheckWrapper
- def answer(self, *args, **kw):
- return super(MTServerConnection, self).answer(*args, **kw)
-
- @lockCheckWrapper
- def checkTimeout(self, *args, **kw):
- return super(MTServerConnection, self).checkTimeout(*args, **kw)
-
Modified: trunk/neo/tests/testConnection.py
==============================================================================
--- trunk/neo/tests/testConnection.py [iso-8859-1] (original)
+++ trunk/neo/tests/testConnection.py [iso-8859-1] Mon Mar 8 21:44:44 2010
@@ -19,7 +19,7 @@
from mock import Mock
from neo.connection import ListeningConnection, Connection, \
ClientConnection, ServerConnection, MTClientConnection, \
- MTServerConnection, HandlerSwitcher, Timeout
+ HandlerSwitcher, Timeout
from neo.connector import getConnectorHandler, registerConnectorHandler
from neo.tests import DoNothingConnector
from neo.connector import ConnectorException, ConnectorTryAgainException, \
More information about the Neo-report
mailing list