diff options
Diffstat (limited to 'pym/_emerge/__init__.py')
-rw-r--r-- | pym/_emerge/__init__.py | 9 |
1 files changed, 6 insertions, 3 deletions
diff --git a/pym/_emerge/__init__.py b/pym/_emerge/__init__.py index e2cc10626..56842fba5 100644 --- a/pym/_emerge/__init__.py +++ b/pym/_emerge/__init__.py @@ -1745,7 +1745,7 @@ class AsynchronousTask(SlotObject): while self._exit_listener_stack: self._exit_listener_stack.pop()(self) -class PollTask(AsynchronousTask): +class AbstractPollTask(AsynchronousTask): __slots__ = ("scheduler",) + \ ("_registered",) @@ -1755,6 +1755,9 @@ class PollTask(AsynchronousTask): _registered_events = PollConstants.POLLIN | PollConstants.POLLHUP | \ _exceptional_events + def _unregister(self): + raise NotImplementedError(self) + def _unregister_if_appropriate(self, event): if self._registered: if event & self._exceptional_events: @@ -1764,7 +1767,7 @@ class PollTask(AsynchronousTask): self._unregister() self.wait() -class PipeReader(PollTask): +class PipeReader(AbstractPollTask): """ Reads output from one or more files and saves it in memory, @@ -2002,7 +2005,7 @@ class TaskSequence(CompositeTask): self._final_exit(task) self.wait() -class SubProcess(PollTask): +class SubProcess(AbstractPollTask): __slots__ = ("pid",) + \ ("_files", "_reg_id") |