News for hackers. Stuff that matters.
Re:Coroutines in C by Thorrez on Sunday February 25, 2024 @05:18PM (#39505476)
> 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.

Re:Coroutines in C by mananaysiempre on Sunday February 25, 2024 @08:36PM (#39506770)
It 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.