Commit 50df4bee authored by Grégory Wisniewski's avatar Grégory Wisniewski

Remove MTServerConnection.

This class is not used as the only multithreaded node does not accept
incoming connections.

git-svn-id: https://svn.erp5.org/repos/neo/trunk@1929 71dcc9de-d417-0410-9af5-da40c76e7ee4
parent 1da20e8c
......@@ -632,52 +632,3 @@ class MTClientConnection(ClientConnection):
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)
......@@ -19,7 +19,7 @@ from time import time
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, \
......
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