Closed
Description
Per the September 2022 plenary discussion, the DisposableStack.prototype.use
method should not be overloaded and instead split into multiple methods:
use(disposable)
to add a disposable resource to be disposed when the stack is disposed.adopt(value, onDispose)
to add a non-disposable resource (value
), such thatonDispose(value)
is called when the stack is disposed.defer(onDispose)
to add a callback to execute when the stack is disposed.
Metadata
Metadata
Assignees
Labels
No labels