Resource management

Isiah Meadows isiahmeadows at
Thu Dec 29 15:17:31 UTC 2016

But keep in mind it still doesn't cover two key issues:

1. Synchronous resources do in fact exist (primarily in Node). You
need both for it to be effective.
2. Your suggestion isn't composable at all (like nearly every other
callback-driven API), and it prevents returning from inside the block
without the use of exceptions.

Isiah Meadows
me at

On Thu, Dec 29, 2016 at 9:05 AM, Raul-Sebastian Mihăilă
<raul.mihaila at> wrote:
> I agree, but note that a resolved promise is not the same as a fulfilled
> promise (
> On Thu, Dec 29, 2016 at 11:40 AM, Jordan Harband <ljharb at> wrote:
>> You'd need to wrap the body of your `open` function in a try/finally, and
>> do the `fsp.close` in the `finally` block - but otherwise that would
>> certainly work, provided that the promise returned from `func` did actually
>> settle (resolve or reject).
> _______________________________________________
> es-discuss mailing list
> es-discuss at

More information about the es-discuss mailing list