# Functions
BackgroundContextWithCancellationDelayer generate a "Background" context that is cancellation delayable.
CleanupCancellationDelayer cleans up a context (ctx) that is cancellation delayable and makes the go routine spawned in NewContextWithCancellationDelayer exit.
EnableDelayedCancellationWithGracePeriod can be called on a "cancellation delayable" context produced by NewContextWithCancellationDelayer, to enable delayed cancellation for ctx.
NewContextReplayable creates a new context from ctx, with change applied.
NewContextWithCancellationDelayer creates a new context out of ctx.
NewContextWithReplayFrom constructs a new context out of ctx by calling all attached replay functions.
# Constants
CtxCancellationDelayerKey is a context key for using cancellationDelayer.
CtxReplayKey is a context key for CtxReplayFunc.
# Structs
ContextAlreadyHasCancellationDelayerError is returned when NewContextWithCancellationDelayer is called for the second time on the same ctx, which is not supported yet.
CtxNotReplayableError is returned when NewContextWithReplayFrom is called on a ctx with no replay func.
NoCancellationDelayerError is returned when EnableDelayedCancellationWithGracePeriod or ExitCritical are called on a ctx without Critical Awareness.
# Type aliases
CtxCancellationDelayerKeyType is a type for the context key for using cancellationDelayer.
CtxReplayFunc is a function for replaying a series of changes done on a context.
CtxReplayKeyType is a type for the context key for CtxReplayFunc.