diff options
-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 61cfb3050..acca12ace 100644 --- a/pym/_emerge/__init__.py +++ b/pym/_emerge/__init__.py @@ -1764,7 +1764,7 @@ class AsynchronousTask(SlotObject): while self._exit_listener_stack: self._exit_listener_stack.pop()(self) -class PollTask(AsynchronousTask): +class AbstractPollTask(AsynchronousTask): __slots__ = ("scheduler",) + \ ("_registered",) @@ -1774,6 +1774,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: @@ -1783,7 +1786,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, @@ -2021,7 +2024,7 @@ class TaskSequence(CompositeTask): self._final_exit(task) self.wait() -class SubProcess(PollTask): +class SubProcess(AbstractPollTask): __slots__ = ("pid",) + \ ("_files", "_reg_id") |