ReadonlyendRelease all resources held by the task or context.
Arrange for all cleanup functions and result consumers added to the context (via release, must, do, etc.) be called in the appropriate order. When the call to end() returns, all child tasks will have been notified of their cancellation. (But not all of their cleanups or result consumers may have run yet, in the event that another task's end() is in progress when this method is called.)
If any cleanup callbacks throw exceptions, they're sent to
root.asyncThrow(), which by default converts them to unhandled promise
rejections. This ensures all of the callbacks will be run, even if one
throws an error. (And none of the errors will be missed.)
Note: this method is a bound function, so you can pass it as a callback to another task, event source, etc.
A cancellable task, scope, checkpoint, cleanup context, etc.