3 ms·
> attaching a stream to a parser isn't a parallel algorithm so threads are useless for writing it. Couldn't it be done in 2 threads? The output of the decompre
by Thorrez 3y ago
> attaching a stream to a parser isn't a parallel algorithm so threads are useless for writing it.
Couldn't it be done in 2 threads? The output of the decompressor thread feeds to the input of the parser thread.
- mananaysiempre 3y agoIt could be, but given the sometimes astonishing costs of the—effectively—network protocol we know as cache coherency (thousands of cycles if you’re not careful), it’d be a giant waste in many of the cases where stackless coroutines would be perfectly appropriate.