Stopped#

class montreal_forced_aligner.utils.Stopped(initval=False)[source]#

Bases: object

Multiprocessing class for detecting whether processes should stop processing and exit ASAP

Variables:
  • val (Value) – 0 if not stopped, 1 if stopped

  • lock (Lock) – Lock for process safety

  • _source (multiprocessing.Value) – 1 if it was a Ctrl+C event that stopped it, 0 otherwise

reset()[source]#

Signal that work should stop asap

set_sigint_source()[source]#

Set the source as a ctrl+c

source()[source]#

Get the source value

stop()[source]#

Signal that work should stop asap

stop_check()[source]#

Check whether a process should stop