Revert "Use single manager"
This reverts commit c61d6582af0eec51f14b01006e79d5f446c9ea45.
This commit is contained in:
parent
3d456a2e6a
commit
6c617ed585
4 changed files with 7 additions and 6 deletions
ovtk_track
|
@ -1,3 +1,4 @@
|
|||
from multiprocessing import Manager
|
||||
from queue import Empty as QueueEmptyException
|
||||
from threading import BrokenBarrierError
|
||||
from abc import ABC, abstractmethod
|
||||
|
@ -11,7 +12,7 @@ class OutputProcess(PipelineComponent, ABC):
|
|||
|
||||
self.allow_empty_queue = allow_empty_queue
|
||||
|
||||
self._inputs = {key: self.manager.Queue(self._buffer_length * 2) for key in self.__class__.INPUTS.keys()}
|
||||
self._inputs = {key: Manager().Queue(self._buffer_length * 2) for key in self.__class__.INPUTS.keys()}
|
||||
|
||||
@property
|
||||
def inputs(self):
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
import logging
|
||||
from multiprocessing import Process, Manager
|
||||
from multiprocessing import Process
|
||||
from abc import ABC, abstractmethod
|
||||
from traceback import format_exception
|
||||
|
||||
|
@ -17,7 +17,6 @@ class PipelineComponent(Process, ABC):
|
|||
self.name = name
|
||||
|
||||
self.logger = logging.getLogger(f'{__name__}.{name}')
|
||||
self.manager = Manager()
|
||||
|
||||
def _log_error(self, e):
|
||||
for step in format_exception(None, e, e.__traceback__):
|
||||
|
|
|
@ -1,3 +1,4 @@
|
|||
from multiprocessing import Manager
|
||||
from threading import BrokenBarrierError
|
||||
from abc import ABC, abstractmethod
|
||||
|
||||
|
@ -8,7 +9,7 @@ class ProviderProcess(PipelineComponent, ABC):
|
|||
def __init__(self, *args):
|
||||
super().__init__(*args)
|
||||
|
||||
self._outputs = {key: self.manager.Queue(self._buffer_length * 2) for key in self.__class__.OUTPUTS.keys()}
|
||||
self._outputs = {key: Manager().Queue(self._buffer_length * 2) for key in self.__class__.OUTPUTS.keys()}
|
||||
|
||||
@property
|
||||
def outputs(self):
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
from multiprocessing import Pipe
|
||||
from multiprocessing import Pipe, Manager
|
||||
from abc import ABC, abstractmethod
|
||||
|
||||
from ovtk_track.pipelinecomponent import PipelineComponent
|
||||
|
@ -9,7 +9,7 @@ class TransformProcess(PipelineComponent, ABC):
|
|||
super().__init__(*args)
|
||||
self.bufferwise = bufferwise
|
||||
|
||||
self._inputs = {key: self.manager.Queue(1 if bufferwise else self._buffer_length) for key in self.__class__.INPUTS.keys()}
|
||||
self._inputs = {key: Manager().Queue(1 if bufferwise else self._buffer_length) for key in self.__class__.INPUTS.keys()}
|
||||
self.outputs = {}
|
||||
self._outputs = {}
|
||||
for key in self.__class__.OUTPUTS.keys():
|
||||
|
|
Loading…
Add table
Reference in a new issue