Liking cljdoc? Tell your friends :D

csp-clj.protocols.buffer

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

Buffercljprotocol

Protocol for channel buffer implementations.

Protocol for channel buffer implementations.

add!clj

(add! buf value)

Adds an item to the buffer.

Adds an item to the buffer.

capacityclj

(capacity buf)

Returns the maximum capacity.

Returns the maximum capacity.

full?clj

(full? buf)

Returns true if the buffer cannot accept more items.

Returns true if the buffer cannot accept more items.

remove!clj

(remove! buf)

Removes and returns the next item from the buffer.

Removes and returns the next item from the buffer.

sizeclj

(size buf)

Returns the current number of items.

Returns the current number of items.
raw docstring

cljdoc builds & hosts documentation for Clojure/Script libraries

Keyboard shortcuts
Ctrl+kJump to recent docs
Move to previous article
Move to next article
Ctrl+/Jump to the search field
× close