Resource management

Raul-Sebastian Mihăilă raul.mihaila at
Wed Dec 28 12:30:34 UTC 2016

Such a protocol would make sense only if new specific syntax was added to
the language. But is that really necessary when this can be implemented
very easily without new syntax?

async function open(file, opts, func) {
  const fd = await, opts);

  await func(fd);
  await fsp.close(fd);

await open("/path/to/file", {mode: "r+"}, async function (fd) {
  const bit = await;
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <>

More information about the es-discuss mailing list