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, ordefaultwhen unset.- Parameters:
default (Any)
- Return type:
None
- property active: bool#
Whether a real short-circuit predicate is set.
Falsewhenfuncis either no-predicate sentinel: this class’s default, orpyphi.parallel.false()(the publicmap_reducedefault that backends receive).