Package SimPy :: Module Simulation :: Class Process

[hide private]
[frames] | no frames]

# Class Process

source code

       object --+
                |
    Lister.Lister --+
                    |
                   Process

Known Subclasses:
  testSimPy.Consumer, testSimPy.ConsumerPrincL, testSimPy.ConsumerPrincS, testSimPy.ConsumerWidget, testSimPy.FilterConsumer, testSimPy.FireEvent, testSimPy.Interrupted, testSimPy.Interruptor, testSimPy.Job, testSimPy.JobEvt, testSimPy.JobEvtMulti, testSimPy.JobTO, testSimPy.JobTO_P, testSimPy.Observer1, testSimPy.Observer2, testSimPy.P, testSimPy.PS1, testSimPy.PS2, testSimPy.Producer, testSimPy.ProducerPrincL, testSimPy.ProducerPrincS, testSimPy.ProducerWidget, testSimPy.QueueProcess, testSimPy.QueueProcessOR, testSimPy.QueueProcessOR1, testSimPy.SignalProcess, testSimPy.SignalProcessOR, testSimPy.Signaller, testSimPy.TBE, testSimPy.TBELev, testSimPy.TBELevPut, testSimPy.TBEput, testSimPy.TBEtrigger, testSimPy.TBEtriggerLev, testSimPy.TBEtriggerLevPut, testSimPy.TBEtriggerPut, testSimPy.TBT, testSimPy.TBTLev, testSimPy.TBTLevPut, testSimPy.TBTput, testSimPy.WaitProcess, testSimPy.WaitProcessOR, testSimPy.WaitProcessOR1, testSimPy.Waiter, MonitorTest.Actor, MonitorTest.Thing, testSimPyRT.Consumer, testSimPyRT.ConsumerPrincL, testSimPyRT.ConsumerPrincS, testSimPyRT.ConsumerWidget, testSimPyRT.FilterConsumer, testSimPyRT.FireEvent, testSimPyRT.Interrupted, testSimPyRT.Interruptor, testSimPyRT.Job, testSimPyRT.JobEvt, testSimPyRT.JobEvtMulti, testSimPyRT.JobTO, testSimPyRT.JobTO_P, testSimPyRT.Observer1, testSimPyRT.Observer2, testSimPyRT.P, testSimPyRT.PS1, testSimPyRT.PS2, testSimPyRT.Producer, testSimPyRT.ProducerPrincL, testSimPyRT.ProducerPrincS, testSimPyRT.ProducerWidget, testSimPyRT.QueueProcess, testSimPyRT.QueueProcessOR, testSimPyRT.QueueProcessOR1, testSimPyRT.SignalProcess, testSimPyRT.SignalProcessOR, testSimPyRT.Signaller, testSimPyRT.TBE, testSimPyRT.TBELev, testSimPyRT.TBELevPut, testSimPyRT.TBEput, testSimPyRT.TBEtrigger, testSimPyRT.TBEtriggerLev, testSimPyRT.TBEtriggerLevPut, testSimPyRT.TBEtriggerPut, testSimPyRT.TBT, testSimPyRT.TBTLev, testSimPyRT.TBTLevPut, testSimPyRT.TBTput, testSimPyRT.WaitProcess, testSimPyRT.WaitProcessOR, testSimPyRT.WaitProcessOR1, testSimPyRT.Waiter

Superclass of classes which may use generator functions

Instance Methods | [hide private]

`` | __init__(self, name="a_process") x.__init__(...) initializes x; see x.__class__.__doc__ for signature
`` | _hold(self, a)
`` | _passivate(self, a)
`` | acquired(self, res) Multi-functional test for reneging for 'request' and 'get': (1)If res of type Resource: Tests whether resource res was acquired when proces reactivated.
`` | active(self)
`` | cancel(self, victim) Application function to cancel all event notices for this Process instance;(should be all event notices for the _generator_).
`` | interrupt(self, victim) Application function to interrupt active processes
`` | interruptReset(self) Application function for an interrupt victim to get out of 'interrupted' state.
`` | interrupted(self)
`` | passive(self)
`` | queuing(self, resource)
`` | stored(self, buffer) Test for reneging for 'yield put .
`` | terminated(self)
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_process")
(Constructor)

source code

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

  Overrides: object.__init__
    (inherited documentation)

### _hold(self, a)

source code

None

### _passivate(self, a)

source code

None

### acquired(self, res)

source code

    Multi-functional test for reneging for 'request' and 'get':
    (1)If res of type Resource:
        Tests whether resource res was acquired when proces reactivated.
        If yes, the parallel wakeup process is killed.
        If not, process is removed from res.waitQ (reneging).
    (2)If res of type Store:
        Tests whether item(s) gotten from Store res.
        If yes, the parallel wakeup process is killed.
        If no, process is removed from res.getQ
    (3)If res of type Level:
        Tests whether units gotten from Level res.
        If yes, the parallel wakeup process is killed.
        If no, process is removed from res.getQ.

### active(self)

source code

None

### cancel(self, victim)

source code

Application function to cancel all event notices for this Process instance;(should be all event notices for the _generator_).

### interrupt(self, victim)

source code

Application function to interrupt active processes

### interruptReset(self)

source code

Application function for an interrupt victim to get out of 'interrupted' state.

### interrupted(self)

source code

None

### passive(self)

source code

None

### queuing(self, resource)

source code

None

### stored(self, buffer)

source code

Test for reneging for 'yield put . . .' compound statement (Level and Store. Returns True if not reneged. If self not in buffer.putQ, kill wakeup process, else take self out of buffer.putQ (reneged)

### terminated(self)

source code

None