Buffer protocol for channel storage.
Defines the interface for buffer implementations used by buffered channels. Buffers provide FIFO storage with capacity limits.
Key Concepts for New Developers:
Implementations:
Buffer protocol for channel storage. Defines the interface for buffer implementations used by buffered channels. Buffers provide FIFO storage with capacity limits. Key Concepts for New Developers: - Buffers are not thread-safe by design - Channels handle synchronization around buffer operations - Currently only FixedBuffer is implemented Implementations: - csp-clj.buffers.fixed/FixedBuffer
Protocol for channel buffer implementations.
Protocol for channel buffer implementations.
(add! buf value)Adds an item to the buffer.
Adds an item to the buffer.
(capacity buf)Returns the maximum capacity.
Returns the maximum capacity.
(full? buf)Returns true if the buffer cannot accept more items.
Returns true if the buffer cannot accept more items.
(remove! buf)Removes and returns the next item from the buffer.
Removes and returns the next item from the buffer.
(size buf)Returns the current number of items.
Returns the current number of items.
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 |