Open
Description
If the code uses bindEmitter
, and the emitter triggers after context.exit()
, should the emitter work?
For example, the code:
app.use(function*(next) {
var context = ns.createContext();
ns.enter(context);
ns.bindEmitter(this.req);
ns.bindEmitter(this.res);
try {
ns.set('context', this);
yield* next;
} finally {
ns.exit(context);
}
});
If this.res
emits an event after ns.exit
, this event will normally be handled in the context?
I'm asking that, because it must really help to track dead ends in the app. Must know whether this should work or not.