The TuningFork.SonicPi.Thread the calling process is running.
Summary
Functions
Draw from the thread's generator with fun and keep the generator it returns.
The process's thread, started at time zero as an ambient thread if it has none.
Replace the process's thread.
Replace the process's thread with fun of it.
Run fun with thread as the process's thread, then put back whatever was there.
Functions
@spec draw((TuningFork.Rand.t() -> {value, TuningFork.Rand.t()})) :: value when value: term()
Draw from the thread's generator with fun and keep the generator it returns.
@spec get() :: TuningFork.SonicPi.Thread.t()
The process's thread, started at time zero as an ambient thread if it has none.
@spec put(TuningFork.SonicPi.Thread.t()) :: TuningFork.SonicPi.Thread.t()
Replace the process's thread.
@spec update((TuningFork.SonicPi.Thread.t() -> TuningFork.SonicPi.Thread.t())) :: :ok
Replace the process's thread with fun of it.
@spec within(TuningFork.SonicPi.Thread.t(), (-> result)) :: result when result: term()
Run fun with thread as the process's thread, then put back whatever was there.