Skip to content
This repository was archived by the owner on Jan 22, 2025. It is now read-only.
This repository was archived by the owner on Jan 22, 2025. It is now read-only.

Support Node.js domains #120

@domenic

Description

@domenic

Some helpful comments from @mikeal on a probable strategy for supporting domains. This would help, from what I understand, in two situations:

  1. Putting exceptions thrown by .done() into the current domain.
  2. When an event emitter or other domain-using callback library is used inside a fulfillment or rejection handler, and throws an error, it would escape Q but wouldn't escape the domain. E.g.
return Q.resolve().then(function () {
    doSomethingAsyncWithoutPromises(function (err, whatever) {
        // Q doesn't catch this, but domains would if we wired it up right.
        callANonexistantFunction();
    });
});

Metadata

Metadata

Assignees

No one assigned

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions