clockblocks.utilities.fork

clockblocks.utilities.fork(process_function: Callable, args: Sequence = (), kwargs: Optional[dict] = None, name: Optional[str] = None, initial_rate: Optional[float] = None, initial_tempo: Optional[float] = None, initial_beat_length: Optional[float] = None, schedule_at: Optional[Union[float, MetricPhaseTarget]] = None, done_callback: Optional[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