pyphi.parallel.scheduler.ShortcircuitPolicy#

class pyphi.parallel.scheduler.ShortcircuitPolicy(func: 'Callable[[Any], bool]' = <function _never_short_circuit at 0x7ee9cd0aa160>, callback: 'Callable[[Iterable[Any]], None] | None' = None, args: 'Any' = None)[source]#

Bases: object

Parameters:
fire(default)[source]#

Invoke the callback with args, or default when unset.

Parameters:

default (Any)

Return type:

None

property active: bool#

Whether a real short-circuit predicate is set.

False when func is either no-predicate sentinel: this class’s default, or pyphi.parallel.false() (the public map_reduce default that backends receive).