Package SimPy :: Module SimulationStep :: Class SimEvent

[hide private]
[frames] | no frames]

# Class SimEvent

source code

       object --+
                |
    Lister.Lister --+
                    |
                   SimEvent

Supports one-shot signalling between processes. All processes waiting for an event to occur get activated when its occurrence is signalled. From the processes queuing for an event, only the first gets activated.

Instance Methods | [hide private]

`` | __init__(self, name="a_SimEvent") x.__init__(...) initializes x; see x.__class__.__doc__ for signature
`` | signal(self, param=None) Produces a signal to self; Fires this event (makes it occur).
`` | _wait(self, par) Consumes a signal if it has occurred, otherwise process 'proc' waits for this event.
`` | _waitOR(self, par) Handles waiting for an OR of events in a tuple/list.
`` | _queue(self, par) Consumes a signal if it has occurred, otherwise process 'proc' queues for this event.
`` | _queueOR(self, par) Handles queueing for an OR of events in a tuple/list.
Inherited from `Lister.Lister`: `__repr__`, `__str__`, `attrnames` Inherited from `object`: `__delattr__`, `__getattribute__`, `__hash__`, `__new__`, `__reduce__`, `__reduce_ex__`, `__setattr__`

Class Variables | [hide private]

Inherited from `Lister.Lister`: `indent`

Properties | [hide private]

Inherited from `object`: `__class__`

Method Details | [hide private]

### __init__(self, name="a_SimEvent")
(Constructor)

source code

x.__init__(...) initializes x; see x.__class__.__doc__ for signature

  Overrides: object.__init__
    (inherited documentation)

### signal(self, param=None)

source code

Produces a signal to self; Fires this event (makes it occur). Reactivates ALL processes waiting for this event. (Cleanup waits lists of other events if wait was for an event-group (OR).) Reactivates the first process for which event(s) it is queuing for have fired. (Cleanup queues of other events if wait was for an event-group (OR).)

### _wait(self, par)

source code

Consumes a signal if it has occurred, otherwise process 'proc' waits for this event.

### _waitOR(self, par)

source code

Handles waiting for an OR of events in a tuple/list.

### _queue(self, par)

source code

Consumes a signal if it has occurred, otherwise process 'proc' queues for this event.

### _queueOR(self, par)

source code

Handles queueing for an OR of events in a tuple/list.