Skip to content

Make Task implement explicitly managed resource API #1023

@cowboyd

Description

@cowboyd

It should have both Symbol.dispose and Symbol.asyncDispose

Example:

async function main() {
  using task = run(function*() {
    try {
      yield* suspend();
    } finally {
      console.log('done');
    }
  });
}

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions