roarr icon indicating copy to clipboard operation
roarr copied to clipboard

How is roarr non blocking?

Open hulkish opened this issue 2 years ago • 1 comments

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

hulkish avatar Dec 12 '23 03:12 hulkish

@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

kblcuk avatar Jan 10 '24 15:01 kblcuk