Skip to main content

tracked_sync_channel

Function tracked_sync_channel 

Source
pub fn tracked_sync_channel<T>(
    name: TrackedLimit,
    capacity: usize,
) -> (TrackedSyncSender<T>, TrackedReceiver<T>)
Expand description

Create a bounded std::sync::mpsc sync-channel whose depth is tracked by a registered QueueGauge. Drop-in for std::sync::mpsc::sync_channel plus centralized usage tracking + near-capacity warnings.