@epikodelabs/streamix / coroutines/src/public-api / withDeadline
Function: withDeadline()
Defined in: projects/libraries/streamix/coroutines/src/lib/utils/context.ts:141
Derives a child context that automatically cancels at a specific deadline.
Parameters
parent
The parent context.
deadline
A Date or timestamp (in milliseconds) when the context should cancel.
number | Date
Returns
A tuple of [childContext, cancel].