Package buildbot :: Package util :: Module misc :: Class SerializedInvocation
[frames] | no frames]

Class SerializedInvocation

source code

object --+

A method wrapper to serialize calls to a deferred method. If a second call occurs while the first call is still executing, it will not begin until the first call has finished. If multiple calls queue up, they will be collapsed into a single call.

The effect is that the underlying method is guaranteed to be called at least once after every call to the wrapper.

Note that this cannot be used as a decorator on a method, as it will serialize invocations across all class instances. Tests can monkey-patch the _quiet method to be notified when all planned invocations are complete.

Instance Methods
__init__(self, method)
x.__init__(...) initializes x; see help(type(x)) for signature
source code
__call__(self) source code
start(self) source code

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


Inherited from object: __class__

Method Details

__init__(self, method)

source code 

x.__init__(...) initializes x; see help(type(x)) for signature

Overrides: object.__init__
(inherited documentation)