Struct ConcurrentRuntime
pub struct ConcurrentRuntime {
channel_sender: Sender<GCArc<GCDatapointValue>>,
concurrent_threads: u16,
thread_ctx: ThreadCtx,
threads: Vec<JoinHandle<()>>,
}Expand description
Concurrent runtime used to distribute messages to the subscribers using multiple threads.
Fields§
§channel_sender: Sender<GCArc<GCDatapointValue>>§concurrent_threads: u16§thread_ctx: ThreadCtx§threads: Vec<JoinHandle<()>>Implementations§
§impl ConcurrentRuntime
impl ConcurrentRuntime
pub fn new( datapoint_mapping: Arc<RwLock<DatapointMapping>>, concurrent_threads: u16, queue_size: usize, ) -> Self
pub fn get_mapping(&self) -> &RwLock<DatapointMapping>
pub fn get_mapping(&self) -> &RwLock<DatapointMapping>
Returns a reference to the asynchronous subscriber mapping.
pub fn get_sender_channel(&self) -> Sender<GCArc<GCDatapointValue>>
pub fn get_sender_channel(&self) -> Sender<GCArc<GCDatapointValue>>
Returns a reference to the sender channel.
pub fn start(&mut self)
pub fn start(&mut self)
Starts the message broker and distributes the messages to the subscribers using multiple threads.
Trait Implementations§
Auto Trait Implementations§
impl Freeze for ConcurrentRuntime
impl !RefUnwindSafe for ConcurrentRuntime
impl Send for ConcurrentRuntime
impl Sync for ConcurrentRuntime
impl Unpin for ConcurrentRuntime
impl UnsafeUnpin for ConcurrentRuntime
impl !UnwindSafe for ConcurrentRuntime
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more