pypushflow.ThreadCountingActor.ThreadCountingActor#
- class pypushflow.ThreadCountingActor.ThreadCountingActor(name=None, parent=None, thread_counter=None)[source]#
Bases:
PyPushflowLoggedObject,ActorInterfaceThe trigger method will increase the thread counter at the start and decrease the thread counter at the end.
Note: workflow scheduler threads have nothing to do with system threads.
- Parameters:
name (
Optional[str])thread_counter (
Optional[ThreadCounter])
- property pool_resources: int#
- trigger(inData, **kwargs)[source]#
This method
starts a scheduler thread (increments the thread counter),
calls
ActorInterface._execute(actor-specific logic + triggering downstream actors),ends the scheduler thread (decrements the thread counter).
When
ActorInterface._executeis asynchronous, the scheduler thread needs to be deferred and executed as a callback once the asynchronous job completes.- Parameters:
inData (
dict)