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 [email protected]

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

@mcollina
Copy link
Author

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

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