Context
Go-style cooperative cancellation, deadlines, and blocking helpers for Crystal.
Constants
Constructors
Creates a child context canceled when deadline arrives or its parent is canceled.
Creates a context canceled at deadline with Context.background as parent.
Creates a child context canceled when timeout expires or its parent is canceled.
Creates a context canceled after timeout with Context.background as parent.
Class methods
Receives from channel or raises when ctx is canceled.
Sends value to channel or raises when ctx is canceled.
Sleeps until duration elapses or ctx is canceled.
Instance methods
Returns a channel that is closed when this context is canceled.
Use it to compose your own select. Receive-only: never send to or close
the returned channel. A context with no cancellation source returns a fresh
channel that never closes.
Returns a symbol-keyed request-scoped value, if present.
Returns a copy of this context with a typed request-scoped value.