Make handle_message() public
This commit is contained in:
parent
09abb0331d
commit
a389273779
@ -4,7 +4,7 @@ from pipe_io_server import PipeIOServer
|
||||
|
||||
|
||||
class EchoPipeIOServer(PipeIOServer):
|
||||
def _handle_message(self, message):
|
||||
def handle_message(self, message):
|
||||
self.send(message)
|
||||
|
||||
|
||||
|
@ -39,14 +39,14 @@ class PipeIOServer(ABC):
|
||||
|
||||
def _init_io_threads(self):
|
||||
io_threads_dict = {
|
||||
'reader': PipeReaderThread(self.in_pipe, self._handle_message),
|
||||
'reader': PipeReaderThread(self.in_pipe, self.handle_message),
|
||||
'writer': PipeWriterThread(self.out_pipe)
|
||||
}
|
||||
IOThreadsTuple = namedtuple('IOThreadsTuple', sorted(io_threads_dict.keys()))
|
||||
self._io_threads = IOThreadsTuple(**io_threads_dict)
|
||||
|
||||
@abstractmethod
|
||||
def _handle_message(self, message):
|
||||
def handle_message(self, message):
|
||||
raise NotImplementedError()
|
||||
|
||||
def send(self, message):
|
||||
|
Loading…
Reference in New Issue
Block a user