Closed gms1 closed 7 years ago
set timeout issue
this is indeed a bug, good catch!
promise question:
The promise-executor
fires (oddly enough) as soon as the promise is created (synchronously), for this reason some believe that AsyncWrap shouldn't have anything to do with that part of the promise lifetime. There have been a great deal of discussion about this: https://github.com/nodejs/node-eps/pull/18
Form the async-hook
perspective, we have implemented the only perspective that can be implemented in pure javascript. If we wanted events for the entire Promise
object, we would have to know when the was garbage collected, such we could call emit destroy appropriately.
Thanks for the detailed answer!
Guenter
btw in the README.md the link to AsyncWrap is broken, the new location is: https://github.com/nodejs/diagnostics/blob/master/tracing/AsyncWrap/README.md
Thanks, I've updated the link. Maybe I can fix the timer issue tomorrow.
Thank you but that is in no way urgent ;-) I have just pushed an initial version of a new small module, based on async-hook: Https://github.com/gms1/node-async-context As a temporary workaround, I had only to delay the deletion from uid map until the arrival of the post-event
Thank you for your support Guenter
Should be fixed in https://github.com/AndreasMadsen/async-hook/commit/4ef3b4dcd5750513460282a71d26c90cff71899e (version 1.7.0)
Thank you for your work on this project! There seems to be a small bug or unexpected behavior regarding the monkey patched 'setInverval', because the events are triggered in unexpected order ('destroy' before 'post'), after 'clearInterval' has been called:
I would also have a question about promises:
which produces the following output:
Here, the promise-executor function does not trigger any events, as opposed to the 'then' call. Is this a problem of the 'async-hook' project or is this more 'AsyncWrap' related?
Regards Guenter