summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--pym/_emerge/__init__.py14
1 files changed, 6 insertions, 8 deletions
diff --git a/pym/_emerge/__init__.py b/pym/_emerge/__init__.py
index e03b57072..2375546cf 100644
--- a/pym/_emerge/__init__.py
+++ b/pym/_emerge/__init__.py
@@ -8026,7 +8026,7 @@ class PollScheduler(object):
class _sched_iface_class(SlotObject):
__slots__ = ("register", "schedule", "unregister")
- def __init__(self, poll=None):
+ def __init__(self):
self._max_jobs = 1
self._max_load = None
self._jobs = 0
@@ -8034,9 +8034,7 @@ class PollScheduler(object):
self._poll_event_handler_ids = {}
# Increment id for each new handler.
self._event_handler_id = 0
- if poll is None:
- poll = create_poll_instance()
- self._poll = poll
+ self._poll = create_poll_instance()
self._scheduling = False
def _schedule(self):
@@ -8141,8 +8139,8 @@ class QueueScheduler(PollScheduler):
run() method returns when no tasks remain.
"""
- def __init__(self, max_jobs=None, max_load=None, poll=None):
- PollScheduler.__init__(self, poll=poll)
+ def __init__(self, max_jobs=None, max_load=None):
+ PollScheduler.__init__(self)
if max_jobs is None:
max_jobs = 1
@@ -8216,10 +8214,10 @@ class TaskScheduler(object):
add tasks and call run(). The run() method returns when no tasks remain.
"""
- def __init__(self, max_jobs=None, max_load=None, poll=None):
+ def __init__(self, max_jobs=None, max_load=None):
self._queue = SequentialTaskQueue(max_jobs=max_jobs)
self._scheduler = QueueScheduler(
- max_jobs=max_jobs, max_load=max_load, poll=poll)
+ max_jobs=max_jobs, max_load=max_load)
self.sched_iface = self._scheduler.sched_iface
self.run = self._scheduler.run
self._scheduler.add(self._queue)