Skip to content

async_hooks support #1403

Closed
Closed

Description

@overlookmotel

Hi.

Now that async_hooks is in Node 8, would you consider supporting it in bluebird?

I've been following the evolution of async_hooks and have a fair idea of how the JS embedder API works, but am much less familiar with bluebird's internals. I would be happy to prepare a PR to add async_hooks support if someone could perhaps give me a pointer as to where to begin in bluebird's codebase?

Many thanks.

Activity

  1. addaleax commented on Jun 8, 2017

    @addaleax

    I’d recommend waiting a bit because we’re still working out a few kinks with regard to async_hooks + native Promises in Node core; but generally, we’d be up for helping where we can.

  2. benjamingr commented on Jun 8, 2017

    @benjamingr
    Collaborator

    Look for where domains are used - and add the hooks there (optionally as a config).

    Should be pretty straightforward :)

    If you or @addaleax want to work on it I'll merge after review and @petkaantonov will do a release

  3. addaleax commented on Jun 8, 2017

    @addaleax

    Should be pretty straightforward :)

    https://github.com/nodejs/node/issues?utf8=%E2%9C%93&q=label%3Aasync_hooks%20label%3Apromises … there’s quite a bit to read up on, and we are definitely not done implementing this in core. @overlookmotel You are welcome to jump into those threads or ask questions if you have any, this is the kind of thing where it’s really good to get as many clever eyes on it as possible.

  4. benjamingr commented on Jun 8, 2017

    @benjamingr
    Collaborator

    @addaleax correct me if I'm wrong - but we could use the existing domain infrastructure in bluebird to easily do this - no?

    Bluebird already had to solve the difficult question of contexts through resolution scenarios and assimilation of foreign libraries. Bluebird has 4 years of battle tested domain support (compared to your great but recent work in Node when you led and we worked on .promisify).

    I'm far from being a domain expert on async hooks (pun unintended) but bluebird shouldn't have as hard of a job as core doing this.

  5. jbrumwell commented on Sep 14, 2017

    @jbrumwell

    +1 :)

  6. added a commit that references this issue on May 25, 2019
    e1c4a91
  7. papb commented on Oct 1, 2019

    @papb
    Contributor

    Cool, looks like this was finally released (3.6.0), but how do I use this? Where is it documented?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions