Re:Coroutines in C
by loup-vaillant on Tuesday September 22, 2009 @03:27AM
(#836502)
Or you could use lazy evaluation (on the producer). In this case, a simple stream is enough. Then, you call both the producer and the consumer (`return consume(produce());`)
Horrible in C, but beautiful in languages with GC and lambdas.
Horrible in C, but beautiful in languages with GC and lambdas.