Provides functionality for async event handling using core.async, including an in-memory implementation of a broker. This is similar to the one provided in the core lib and is mainly useful for testing/development purposes.
Provides functionality for async event handling using [core.async](https://clojure.github.io/core.async/), including an in-memory implementation of a broker. This is similar to the one provided in the core lib and is mainly useful for testing/development purposes.
(async-invoker handlers evt)Routing invoker that dispatches each handler in its own go-block, collecting all results into a single channel. Returns a channel that will yield a vector of all handler results.
Routing invoker that dispatches each handler in its own go-block, collecting all results into a single channel. Returns a channel that will yield a vector of all handler results.
(core-async-broker & {:keys [channel buf-size] :or {buf-size 10}})Creates a new core.async broker with an optional buffer size (default: 10).
Creates a new core.async broker with an optional buffer size (default: 10).
(get-channel m)Retrieves the channel configured on the broker
Retrieves the channel configured on the broker
(start-broker broker)Starts a go-loop that reads events from the broker channel and dispatches them to all registered listeners.
Starts a go-loop that reads events from the broker channel and dispatches them to all registered listeners.
(stop-broker broker)Closes the broker channel, which terminates the go-loop.
Closes the broker channel, which terminates the go-loop.
cljdoc builds & hosts documentation for Clojure/Script libraries
| Ctrl+k | Jump to recent docs |
| ← | Move to previous article |
| → | Move to next article |
| Ctrl+/ | Jump to the search field |