@epikodelabs/streamix / coroutines/src/public-api / withCancel
Function: withCancel()
Defined in: projects/libraries/streamix/coroutines/src/lib/utils/context.ts:102
Derives a cancellable child context from a parent.
The child is automatically cancelled when the parent is cancelled.
Parameters
parent?
Context = ...
The parent context. Defaults to background().
Returns
A tuple of [childContext, cancel].