Earlier quoted context omitted.
Getcontext/setcontext has always allowed for coroutines in C. This just adds a sugar layer of nonblocking functions that allows a runtime layer to switch between contexts (coroutines), just like Go.
The ucontext stuff is nice but why was it deprecated? It's generally not a problem on x86, but in my experience for other platforms, it gets messy quickly. It would be nice if a replacement or a "de-deprecated" was around.
Mill: Go-style concurrency in C
51–54 of 54 posts
makecontext cannot be correctly represented by the C type system.
Re: Mill: Go-style concurrency in C
#52Earlier quoted context omitted.
it's CSP as extended by golang, i.e. with channels rather than named processes.
Is this how the term OO got degenerated? In Communicating Sequential Processes, you only communicate via messages (C) & the processes (P) sequentially (S) run to completion. Go is not CSP. It is fair to say it was inspired by CSP. Go has a preemptive scheduler, and passing shared memory references is idiomatic and at times unavoidable.
The story is quite interesting if you have not read it. One of my favorite reads.
http://userpage.fu-berlin.de/~ram/pub/pub_jf47ht81Ht/doc_kay...