Skip to content

putAsync/takeAsync should return a Promise #109

Open
@tmtxt

Description

@tmtxt

Just like their names, these functions should return a Promise (maybe when no callback function specified)

  • putAsync
  • takeAsync

Use with es7 async/await function

await putAsync(ch, 42);
...
var res = await takeAsync(ch);

Use with other libraries like co

yield putAsync(ch, 42);
...
var res = yield takeAsync(ch);

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions