summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorZac Medico <zmedico@gentoo.org>2008-12-23 20:59:55 +0000
committerZac Medico <zmedico@gentoo.org>2008-12-23 20:59:55 +0000
commit0d846f548a9018981f6d20b916b56973881dcf89 (patch)
tree60f64278ba79faa13e57705f0f89c0c6745b0559
parent774402884faf280ee8c9ad06646ddf533c5e10f4 (diff)
downloadportage-0d846f548a9018981f6d20b916b56973881dcf89.tar.gz
portage-0d846f548a9018981f6d20b916b56973881dcf89.tar.bz2
portage-0d846f548a9018981f6d20b916b56973881dcf89.zip
Rename the PollTask class to AbstractPollTask.
svn path=/main/trunk/; revision=12289
-rw-r--r--pym/_emerge/__init__.py9
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")