split_chain_mpsc

Function split_chain_mpsc 

Source
pub unsafe fn split_chain_mpsc(
    pool: *mut SlotPoolLayout,
    queue: *mut MpscQueue,
) -> (ChainMpscProducer, ChainMpscConsumer)
Expand description

Create MPSC producer/consumer handles over a shared slot pool and a specific MPSC queue.

ยงSafety

The caller must ensure:

  • pool and queue point into a valid, initialized, mapped region.
  • The mapping outlives all returned handles.
  • Exactly one thread uses the consumer at a time.
  • Producer handles may be used concurrently.