-
Notifications
You must be signed in to change notification settings - Fork 40
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Promise.resolve() does not work correctly inside an inotify callback #67
Comments
@redneb I don't think we have added support for promises yet. Any help is appreciated. |
This issue is not about promises per se, nor I'm asking you to add support for promises to
works as expected when executed by itself (i.e. it produces two lines of output, |
Here's another complete example that has the same problem and does not use promises at all:
I expect that every time the above program prints |
@redneb thanks for the detailed issue report! I'm looking into it and I will keep you posted here. |
@redneb, alright, I think I know what I need to do to fix this. I will find some time tonight to do it. We need to change Line 278 in 15001bb
|
@redneb thanks again, the fix landed on v1.4.2. |
Promise.resolve()
returns an already resolved promise and thereforePromise.resolve().then(...)
should execute the promise callback immediately. But when I try that from within an inotify callback, the promise callback never gets called. Here's a minimal example:When I run this with node v8.4.0 and do a
touch .
in a different terminal, I do not seedone
in the output.The text was updated successfully, but these errors were encountered: