cthreadcomm · Section 3
cchan_disable_sending
NAME
cchan_disable_sending - turn off sends on a cchan direction
LIBRARY
C Collections (libccollections, -lccollections)
SYNOPSIS
#include <ccollections/cthreadcomm.h> ccol_retval cchan_disable_sending(cchan *ch, cchan_direction d);
DESCRIPTION
Refuses every new send on the given direction and wakes every thread that is blocked inside a send on that direction. From then on the queue of that direction counts as ready for a write selectable of cselect() and for a write registration of a ceventloop, the same way a pipe whose reader has gone is ready for POLLOUT. The send that the waiter makes after that wake returns ccol_not_permitted at once. ccircq_disable_sending(3) has the details.
PARAMETERS
ch Channel to change
d Direction that gets sends turned off (cchan_owner_to_workers or
cchan_workers_to_owner)
RETURN VALUE
ccol_success - Sends are off ccol_invalid_args - ch is NULL, or d is not valid
NOTES
Only the given direction changes; the other one keeps its state. To turn sends back on, call cchan_enable_sending().