Implement support for waiting for PipeIOServer to stop
This commit is contained in:
parent
b1d23f9d95
commit
8f80f49a86
@ -16,3 +16,4 @@ if __name__ == "__main__":
|
|||||||
print('Running pipe IO server with named pipes:')
|
print('Running pipe IO server with named pipes:')
|
||||||
print(f'Input: {pipe_io.in_pipe}')
|
print(f'Input: {pipe_io.in_pipe}')
|
||||||
print(f'Output: {pipe_io.out_pipe}')
|
print(f'Output: {pipe_io.out_pipe}')
|
||||||
|
pipe_io.wait()
|
||||||
|
@ -58,3 +58,6 @@ class PipeIOServer(ABC, Thread):
|
|||||||
thread.stop()
|
thread.stop()
|
||||||
Pipe(self.in_pipe).remove()
|
Pipe(self.in_pipe).remove()
|
||||||
Pipe(self.out_pipe).remove()
|
Pipe(self.out_pipe).remove()
|
||||||
|
|
||||||
|
def wait(self):
|
||||||
|
self._stop_event.wait()
|
||||||
|
Loading…
Reference in New Issue
Block a user