A discussion with an old-timer reminds me this coding technique for cooperative threads.
Coroutines are not used anymore because C and other languages don't allow this structure, so few people bother today... Yet they are still very interesting.
(more about them later)
...
Discussions
Become a Hackaday.io Member
Create an account to leave a comment. Already have an account? Log In.
I thought coroutines were used a lot these days? I'm sure you've heard of goroutines, but also many up and coming languages have explicit support for them as an alternative to threads.
There are several C libraries implementing coroutines as well. They generally (ab)use the gcc label pointer extensions and/or setjmp.
Are you sure? yes | no
"C and other languages don't allow this structure" ... well, there's always Simon Tatham's hack for implementing coroutines in C -- it's cheating a bit, because it doesn't *really* work the way you'd expect coroutines to work, but it emulates them quite nicely: https://www.chiark.greenend.org.uk/~sgtatham/coroutines.html
Are you sure? yes | no
Thanks ! I'll have to see that !
Are you sure? yes | no