Commit 442b8927 authored by Ontje Lünsdorf's avatar Ontje Lünsdorf
Browse files

Set default priority for convenience and set name attribute in initialize.

parent 9f6191db
......@@ -355,6 +355,7 @@ class Initialize(Event):
"""Initializes a process."""
def __init__(self, env, process):
self.env = env = None
self.ok = True
self._value = None
self.callbacks = [process._resume]
......@@ -528,7 +529,7 @@ class Scheduler(object):
self.queue = []
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*."""
heappush(self.queue, ( + delay, priority, next(self._eid),
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