|
|
|
|
|
by _yosefk
4691 days ago
|
|
The trouble with them is they're stackless, which means you can't have arbitrary functions thoughtlessly coded by someone unaware of threading called inside many different protothreads. Coroutines are easier to combine with code not written to account for their existence (of course stack overflow is a big concern though, which can be somewhat mitigated through memory protection depending on the OS and the hardware). |
|
In my experience of using protothreads, only the functions using the protothread macros need to be written in a special way:
while all the other ones can stay plain C functions.