Skip to content
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

use fs.readFile instead of setImmediate #9

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

mcollina
Copy link

Signed-off-by: Matteo Collina hello@matteocollina.com

The solution to the immediate re-entrancy problem is to not use setImmediate to spin up the event loop. Using fs is a way to execute something in a different phase of the event loop, so we avoid the setImmediate re-entrancy issue.

Fixes #8

Signed-off-by: Matteo Collina <hello@matteocollina.com>
@mcollina
Copy link
Author

@addaleax LMK if you want to switch to another kind of fs API.

addaleax added a commit that referenced this pull request Aug 19, 2022
Co-authored-by: Matteo Collina <hello@matteocollina.com>
Fixes: #8
Fixes: #9
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

crash when stopping next to immediates
1 participant