Liking cljdoc? Tell your friends :D

tech.thomascothran.pavlov.bprogram


kill!clj/s

(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.
raw docstring

start!clj/s

(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.
raw docstring

stop!clj/s

(stop! bprogram)

Stop the bprogram, allowing bthreads to finish requesting and processing events.

Stop the bprogram, allowing bthreads to finish requesting and processing events.
raw docstring

submit-event!clj/s

(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.
raw docstring

subscribe!clj/s

(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`.
raw docstring

cljdoc is a website building & hosting documentation for Clojure/Script libraries

× close