Helper super-class to run background processes and clean up after them.
Child class should have method which spawns subprocess and add it handler to self.child_processes list.
Also don’t forget to call recycle
-
run_detached(func, args)[source]
Abstaction to spawn Thread or Process
:return:
-
after_proc_finished(proc)[source]
-
recycle(force=False)[source]
Cleanup unused process, should be invoked periodically
:param force: do recycle now unconditionally
:type force: bool
-
terminate()[source]
-
children_number[source]