Skip to main content

patch_seq_chan_receive

Function patch_seq_chan_receive 

Source
#[unsafe(no_mangle)]
pub unsafe extern "C" fn patch_seq_chan_receive(stack: Stack) -> Stack
Expand description

Receive a value from a channel.

Stack effect: ( Channel – value Bool )

Blocks cooperatively until a value arrives or the channel is closed and drained. Returns ( value true ) on success, ( Int(0) false ) on close. The closed-sentinel is re-broadcast before returning so other blocked receivers wake up too — see module doc.

§Safety

Stack must have a Channel on top.