Buffer factory functions for csp-clj channels.
This namespace provides functions to create buffer instances that can be passed to channel creation functions.
Key Concepts for New Developers:
Currently supported buffer types:
Most users should use csp-clj.core/fixed-buffer instead of this namespace directly.
Buffer factory functions for csp-clj channels. This namespace provides functions to create buffer instances that can be passed to channel creation functions. Key Concepts for New Developers: - Buffers provide storage for channel values - Fixed buffers block puts when full - Buffers are not thread-safe by design (channels handle synchronization) Currently supported buffer types: - FixedBuffer: FIFO queue with fixed capacity Most users should use csp-clj.core/fixed-buffer instead of this namespace directly.
Creates a fixed-size buffer for use with channels.
Parameters:
Returns: A buffer implementing csp-clj.protocols.buffer/Buffer
Example: (fixed-buffer 10) => #csp_clj.buffers.fixed.FixedBuffer{...}
See also: csp-clj.buffers.fixed/create
Creates a fixed-size buffer for use with channels.
Parameters:
- capacity: positive integer for buffer size
Returns:
A buffer implementing csp-clj.protocols.buffer/Buffer
Example:
(fixed-buffer 10)
=> #csp_clj.buffers.fixed.FixedBuffer{...}
See also: csp-clj.buffers.fixed/createcljdoc 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 |