Expand description
Thread Channel for intra-process thread communication
This module provides a high-performance channel for communication between threads within the same process, using crossbeam-channel as the underlying implementation.
§Example
use ipckit::ThreadChannel;
use std::thread;
// Create an unbounded channel
let (tx, rx) = ThreadChannel::<String>::unbounded();
thread::spawn(move || {
tx.send("Hello from thread!".to_string()).unwrap();
});
let msg = rx.recv().unwrap();
assert_eq!(msg, "Hello from thread!");Structs§
- Thread
Channel - A bidirectional thread channel that combines both sender and receiver.
- Thread
Receiver - A thread-safe channel receiver for intra-process communication.
- Thread
Sender - A thread-safe channel sender for intra-process communication.