This is very similar to the DisposableStack interface, except disposal of resources is promise-based.