Package SimPy :: Module SimulationRT :: Class Process

[hide private]
[frames] | no frames]

# Class Process

source code

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

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
`` | active(self)
`` | passive(self)
`` | terminated(self)
`` | interrupted(self)
`` | queuing(self, resource)
`` | cancel(self, victim) Application function to cancel all event notices for this Process instance;(should be all event notices for the _generator_).
`` | _hold(self, a)
`` | _passivate(self, a)
`` | interrupt(self, victim) Application function to interrupt active processes
`` | interruptReset(self) Application function for an interrupt victim to get out of 'interrupted' state.
`` | 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.
`` | stored(self, buffer) Test for reneging for 'yield put .
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)

### active(self)

source code

None

### passive(self)

source code

None

### terminated(self)

source code

None

### interrupted(self)

source code

None

### queuing(self, resource)

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_).

### _hold(self, a)

source code

None

### _passivate(self, a)

source code

None

### 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.

### 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.

### 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)