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

How is roarr non blocking? #84

Open
hulkish opened this issue Dec 12, 2023 · 1 comment
Open

How is roarr non blocking? #84

hulkish opened this issue Dec 12, 2023 · 1 comment

Comments

@hulkish
Copy link

hulkish commented Dec 12, 2023

Can someone please elaborate specifically what roarr is doing which would otherwise be considered a "blocking" operation?

@kblcuk
Copy link

kblcuk commented Jan 10, 2024

@hulkish it's using nodejs streams to write out instead of console, and streams are non-blocking by nature (so the process doesn't need to wait for the log message to be written out to continue doing actual task at hand).

https://github.com/gajus/roarr/blob/main/src/factories/createNodeWriter.ts#L3-L24

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

No branches or pull requests

2 participants