Package SimPy :: Module Lib :: 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``'`, sim=None) x.__init__(...) initializes x; see x.__class__.__doc__ for signature | source code

signal(self, param=None) Produces a signal to self; Fires this event (makes it occur). | source code

_wait(self, par) Consumes a signal if it has occurred, otherwise process 'proc' waits for this event. | source code

_waitOR(self, par) Handles waiting for an OR of events in a tuple / list. | source code

_queue(self, par) Consumes a signal if it has occurred, otherwise process 'proc' queues for this event. | source code

_queueOR(self, par) Handles queueing for an OR of events in a tuple / list. | source code

Inherited from `Lister.Lister`: `__repr__`, `__str__`, `attrnames` Inherited from `object`: `__delattr__`, `__format__`, `__getattribute__`, `__hash__`, `__new__`, `__reduce__`, `__reduce_ex__`, `__setattr__`, `__sizeof__`, `__subclasshook__`

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``'`, sim=None)
(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).)