Checking a context once is enough only when the remaining work cannot block for long. A channel send can wait forever if its receiver leaves, so a cancellable operation needs a select that also observes Done. A precheck gives an already canceled caller a deterministic refusal; otherwise a ready send and a ready cancellation may both be eligible. The functions here state that rule explicitly. You will send or receive through local channels and stop when the context no longer permits work. Use cancellation to release work, not to declare that every result was delivered. The checks avoid timing assumptions by supplying channels that are buffered, closed or already canceled. No sleeps or external network operations are needed.
Send the requested value.