Home | Trees | Index | Help |
---|
Package twisted :: Package python :: Module delay :: Class LockstepSimulation |
|
Sensitive
--+
|
LockstepSimulation
I am a delayed event queue.
A delayed event scheduler which, in my humble but correct opinion, is much better and more featureful than the built-in 'sched' module, especially when you're working with event insertions from multiple threads.
Various methods in this class return Stoppable objects; each of these has a single stop() method which will cause the method that created them to be cancelled. In the case of a loop, the loop will be stopped; a series of steps will be stopped in the middle, and a single method call will not be made.Method Summary | |
---|---|
Initialize the delayed event queue. | |
Delayed.__setstate__(dict) -> None | |
Delayed.later(func [, ticks [, args]]) -> Stoppable | |
Get the latest version of an object. (inherited from Sensitive )
| |
Delayed.loop(func[, ticks=0][, args=()]) -> Stoppable | |
(inherited from Sensitive )
| |
(inherited from Sensitive )
| |
Delayed.run() -> None | |
Run all currently-pending callbacks. | |
Runs until the is_running flag is false. | |
Delayed.runUntilCurrent() -> None | |
Delayed.step(func,list[,ticks]) -> Stoppable | |
In multithreaded mode, stops threads started by self.threadloop() | |
Run self.runloop in a separate thread. | |
Delayed.timeout() -> integer (representing seconds) |
Class Variable Summary | |
---|---|
float |
fudgefactor
|
class |
IDelayed
|
Method Details |
---|
__init__(self)
Initialize the delayed event queue.
|
__setstate__(self, dict)Delayed.__setstate__(dict) -> None Flags this Delayed as current, so that unpickled Delayeds won't attempt to run hundreds of updates so they'll be current. |
later(self, func, ticks=0, args=())Delayed.later(func [, ticks [, args]]) -> Stoppable This function schedules the function 'func' for execution with the arguments 'args', 'ticks' ticks in the future. A 'tick' is one call to the 'run' function. |
loop(self, func, ticks=0, args=())Delayed.loop(func[, ticks=0][, args=()]) -> Stoppable This schedules the function *func* for repeating execution every *ticks* ticks. |
run(self)Delayed.run() -> None This runs one cycle of events, and moves the tickcount by one. (I would say "increments", but it actually decrements it for simplicity of implementation reasons. -glyph) |
runEverything(self)Run all currently-pending callbacks. |
runloop(self)Runs until the is_running flag is false. |
runUntilCurrent(self)Delayed.runUntilCurrent() -> None This will run this delayed object until it is up-to-date with delay expects to get another run() callthe current clock time. |
step(self, func, list, ticks=0)Delayed.step(func,list[,ticks]) -> Stoppable This schedules the function *func* for execution with each element in *list* as its only argument, pausing *ticks* ticks between each invocation. |
stop(self)In multithreaded mode, stops threads started by self.threadloop() |
threadloop(self)Run self.runloop in a separate thread. |
timeout(self)Delayed.timeout() -> integer (representing seconds) This says approximately how long from the current time this delay expects to get another run() call. |
Class Variable Details |
---|
fudgefactor
|
IDelayedIDelayed = twisted.python.delay.IDelayed
|
Home | Trees | Index | Help |
---|
Generated by Epydoc 1.2 prerelease on Wed Jan 29 06:25:56 2003 | http://epydoc.sf.net |