While reading the boost::coroutine documentation, I came accross the term control block :
The solution is that each coroutine has its own stack and control-block
While the notion of a stack is fairlly familiar, I've never encountered the term control block before. The following image may have provided some contextual (no pun intended) understanding of what a control block is

Since I can't google my way to a better explanation (the provided link to boost context only made things more obscure), could anyone provide a solid definition and explain the workings of a control block?
thanks
The term dates back to the Process Control Block from IIRC CP/M, at least 4 decades. It's the block of data which describes a running context. Later on, threads got Thread Control Blocks Here the need for state meant a similar data structure, so the name Control Block makes sense. The only oddity is that usually these Control Blocks are OS structures, but boost coroutines aren't OS managed.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With