clockblocks.utilities.fork

clockblocks.utilities.fork(process_function: Callable, args: Sequence = (), kwargs: dict = None, name: str = None, initial_rate: float = None, initial_tempo: float = None, initial_beat_length: float = None, schedule_at: float | MetricPhaseTarget = None, done_callback: Callable = None) Clock[source]

Spawns a parallel process running on a child clock of the currently active clock.

Parameters:
  • process_function – see fork()

  • name – see fork()

  • initial_rate – see fork()

  • initial_tempo – see fork()

  • initial_beat_length – see fork()

  • args – see fork()

  • kwargs – see fork()

  • schedule_at – see fork()

  • done_callback – a callback function to be invoked when the clock has terminated

Returns:

the clock of the newly forked process