Commit b499edee authored by Stefan Scherfke's avatar Stefan Scherfke
Browse files

Merge.

parents 8318fb76 442b8927
...@@ -323,6 +323,7 @@ class Initialize(Event): ...@@ -323,6 +323,7 @@ class Initialize(Event):
"""Initializes a process.""" """Initializes a process."""
def __init__(self, env, process): def __init__(self, env, process):
self.env = env self.env = env
self.name = None
self.ok = True self.ok = True
self._value = None self._value = None
self.callbacks = [process._resume] self.callbacks = [process._resume]
...@@ -496,7 +497,7 @@ class Scheduler(object): ...@@ -496,7 +497,7 @@ class Scheduler(object):
self.queue = [] self.queue = []
self._eid = count() self._eid = count()
def schedule(self, event, priority, delay=0): def schedule(self, event, priority=DEFAULT_PRIORITY, delay=0):
"""Schedule an *event* with a given *priority* and a *delay*.""" """Schedule an *event* with a given *priority* and a *delay*."""
heappush(self.queue, (self.now + delay, priority, next(self._eid), heappush(self.queue, (self.now + delay, priority, next(self._eid),
event)) event))
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment