pink.processes

Write process code that works as control functions.

countdown-latch

(countdown-latch num-wait)
Create a countdown-latch that satisfies ICountdownLatch and
PinkSignal protcols. Useful for coordinating and waiting for
multiple processes to signal.

create-pink-process

(create-pink-process proc-fn)

cue

(cue)
Create a cue signal that satisfies ICue and PinkSignal protocols.
Useful for one-to-many signalling.

ICountdownLatch

protocol

members

count-down

(count-down this)

latch-done?

(latch-done? this)

ICue

protocol

members

has-cued?

(has-cued? this)

signal-cue

(signal-cue this)

IPinkProcess

protocol

members

active?

(active? this)

kill

(kill this)

paused?

(paused? this)

toggle-pause

(toggle-pause this)

pink-wait

(pink-wait c)

PinkSignal

protocol

members

signal-done?

(signal-done? this)

process

macro

(process & body)
Create a state-machine-based Pink control function.

process-done

(process-done state wait-val)

process-wait

(process-wait state blk wait-val)

wait

macro

(wait c)
Wait upon a given time, PinkSignal, or predicate. Must be used
within a Pink process.

WAIT-IDX