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
Core channel protocol defining the fundamental operations for all channel implementations in csp-clj.
This protocol abstracts over buffered and unbuffered channels, providing a uniform interface for:
Thread Safety: All methods in this protocol are thread-safe and may be called concurrently from multiple virtual threads.
Core channel protocol defining the fundamental operations for all channel implementations in csp-clj. This protocol abstracts over buffered and unbuffered channels, providing a uniform interface for: - Synchronous/asynchronous value transfer - Channel lifecycle management - Timeout support for blocking operations Thread Safety: All methods in this protocol are thread-safe and may be called concurrently from multiple virtual threads.
Protocol for channel multiplexers (mults).
A multiplexer distributes values from a source channel to multiple tap channels concurrently. Each value from the source is sent to all registered taps.
Key Characteristics:
Use Case: Broadcasting messages to multiple consumers, fan-out patterns, event distribution.
Protocol for channel multiplexers (mults). A multiplexer distributes values from a source channel to multiple tap channels concurrently. Each value from the source is sent to all registered taps. Key Characteristics: - Broadcast semantics: all taps receive all values - Concurrent dispatch: each tap gets its own virtual thread - Backpressure: blocks until all taps accept each value - Lifecycle management: taps can auto-close with source Use Case: Broadcasting messages to multiple consumers, fan-out patterns, event distribution.
Protocol for topic-based publish/subscribe channels.
A publisher routes values from a source channel to subscriber channels based on a topic function. Each topic maintains its own independent distribution mechanism.
Key Characteristics:
Use Case: Event buses, message routing, category-based distribution (e.g., by event type, user ID, etc.).
Protocol for topic-based publish/subscribe channels. A publisher routes values from a source channel to subscriber channels based on a topic function. Each topic maintains its own independent distribution mechanism. Key Characteristics: - Topic routing: values routed based on topic-fn(value) - Per-topic fan-out: each topic has its own set of subscribers - Dynamic subscription: subscribers can join/leave at any time - Auto-cleanup: topics with no subscribers are cleaned up Use Case: Event buses, message routing, category-based distribution (e.g., by event type, user ID, etc.).
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 |