(kill! bprogram)
Kill the bprogram. No guarantees that bthreads will finish requesting and processing events.
Useful for deadlocks.
Kill the bprogram. No guarantees that bthreads will finish requesting and processing events. Useful for deadlocks.
(start! bthreads)
(start! bthreads opts)
Start the program with the given bthreads
.
Optionally, provide an opts
map as the second argument.
opts
include:
subscribers
: a map with the key designating the subscriber, and the value the function to call on each event.Start the program with the given `bthreads`. Optionally, provide an `opts` map as the second argument. `opts` include: - `subscribers`: a map with the key designating the subscriber, and the value the function to call on each event.
(stop! bprogram)
Stop the bprogram, allowing bthreads to finish requesting and processing events.
Stop the bprogram, allowing bthreads to finish requesting and processing events.
(submit-event! bprogram event)
Submit an event to the behavioral program.
Events are placed in a queue and are not processed synchronously.
Submit an event to the behavioral program. Events are placed in a queue and are not processed synchronously.
(subscribe! bprogram k f)
Apply f
to every event emitted from the bprogram.
f
is keyed under k
. You can update f
by calling subscribe!
again with the same k
.
Apply `f` to every event emitted from the bprogram. `f` is keyed under `k`. You can update `f` by calling `subscribe!` again with the same `k`.
cljdoc is a website building & hosting documentation for Clojure/Script libraries
× close