This file is not limited to co-routines. Also covers iterators, generators.

https://develop.corosio.cpp.al/corosio/index.html
https://github.com/cppalliance/corosio


https://vittorioromeo.com/index/blog/sfex_coroutine.html
stackless coroutines for gamedev in ~200 lines of C++
Our goal is to implement coroutines that meet these criteria:
1. Allocation-free: The entire coroutine state is one int plus whatever members4 you put on the struct.
2. Trivially serializable: Save the integer state and the struct’s data, and that’s it. Mid-cutscene saving and loading just works™.
3. Deterministic: No hidden compiler lowering; the generated control flow could be written by hand.
4. Composable: Coroutines can await other coroutines, all in straight-line code.
5. Tiny: The whole runtime is a small header you can read in one sitting.
https://github.com/vittorioromeo/VRSFML/blob/master/examples/include/ExampleUtils/SfexCoroutine.hpp


https://elric.pl/blog/cooperative-multitasking/
Cooperative multitasking in Rust
jlf: todo read
- Custom schedulers & bypassing the default executor
- Retry logic with state tracking
- Segmented stacks for deep async recursion
    https://releases.llvm.org/3.0/docs/SegmentedStacks.html
- Priority inversion mitigation via yield-aware mutexes
- Thread-local stealing for heterogeneous workloads
- Lock-free task termination with epoch-based reclamation
- Stack pivoting for hybrid async/synchronous code


https://dev-doc.rust-lang.org/beta/unstable-book/language-features/generators.html
generators
The generators feature gate in Rust allows you to define generator or coroutine literals.
A generator is a "resumable function" that syntactically resembles a closure but
compiles to much different semantics in the compiler itself. The primary feature
of a generator is that it can be suspended during execution to be resumed at a later date.
Generators use the yield keyword to "return", and then the caller can resume a generator
to resume execution just after the yield keyword.


http://www.ada-auth.org/cgi-bin/cvsweb.cgi/ai12s/ai12-0197-3.txt?rev=1.7&raw=N
Interesting discussion about generators in Ada

http://www.ada-auth.org/cgi-bin/cvsweb.cgi/ai12s/ai12-0197-4.txt?rev=1.4&raw=N
Ada Coroutines and channels

https://simontoth.substack.com/p/daily-bite-of-c-coroutines-step-by
Coroutines: step by step
reddit comments:
https://www.reddit.com/r/cpp/comments/1bh3ztd/coroutines_step_by_step_a_journey_through_seven/

https://blog.adacore.com/coroutines-in-ada-a-clean-but-heavy-implementation
Coroutines with Rendezvous

https://www.ilikebigbits.com/2016_03_20_coroutines.html
very simple coroutine implementation that is just a wrapper around a std::thread
but with mechanisms to pass the execution from the outer (owning) thread to the
inner (coroutine) thread

https://github.com/llvm/llvm-project/blob/main/llvm/docs/Coroutines.rst

https://davidwalsh.name/es6-generators

http://jlongster.com/Taming-the-Asynchronous-Beast-with-CSP-in-JavaScript
https://github.com/jlongster/js-csp
CSP, channel

https://www.reddit.com/r/javascript/comments/3i1td3/how_does_yield_actually_pauseresume_the_flow_of_a/
Implemented in the parser (yes !)
Interesting technique to provide the info :
reference the source code in github.
https://github.com/joyent/node/blob/d13d7f74d794340ac5e126cfb4ce507fe0f803d5/deps/v8/src/parser.cc#L1009:L1013

http://factor-language.blogspot.fr/2010/04/switching-call-stacks-on-different.html

http://www.dekorte.com/projects/opensource/libcoroutine/

https://en.wikipedia.org/wiki/Call-with-current-continuation
http://en.wikipedia.org/wiki/Coroutine#Coroutines_and_generators
http://en.wikipedia.org/wiki/Fiber_%28computer_science%29

http://tia.mat.br/blog/html/2012/09/29/asynchronous_i_o_in_c_with_coroutines.html
http://tia.mat.br/blog/html/2013/09/26/implementing_sequences_in_lwan_template_engine.html
https://github.com/lpereira/lwan/commit/a4188d73a00cec4c99d50473803c44bfb2218d13

http://swtch.com/libtask/
reddit comment :
One of the guys behind Go also implemented coroutines and channels in C originally for use in Plan9 I believe.

http://blog.paralleluniverse.co/post/49445260575/quasar-pulsar

http://www.matthiasmann.de/content/view/24/26/
Java contunuations library

http://www.boost.org/doc/libs/1_53_0/libs/coroutine/doc/html/index.html

http://railsware.com/blog/2012/03/13/ruby-2-0-enumerablelazy/

http://www.cs.arizona.edu/icon/docs/ipd266.htm
Icon generators

http://www.icsi.berkeley.edu/~sather/Documentation/LanguageDescription/webmaker/DescriptionX2Eiterators-chapte-1.html#HEADING1-19
Sather iterators

http://www.python.org/dev/peps/pep-3152/
cofunctions

https://www.python.org/dev/peps/pep-0492/
Coroutines with async and await syntax

http://www.python.org/dev/peps/pep-0380/
Syntax for Delegating to a Subgenerator

https://www.python.org/dev/peps/pep-0342/
Coroutines via Enhanced Generators

http://codespeak.net/py/0.9.2/greenlet.html
Python

http://yinsochen.com/flapjax-functional-reactive-programming-in-javascrip/

http://flapjax-lang.org/

http://www.dabeaz.com/coroutines/

https://github.com/harukizaemon/hamster
Hamster - Efficient, Immutable, Thread-Safe Collection classes for Ruby


http://paradigmatic.streum.org/2011/03/lazy-parallel-evaluation/

http://www.ruby-doc.org/core-1.9/classes/Fiber.html

http://www.infoq.com/news/2007/08/ruby-1-9-fibers

http://blade.nagaokaut.ac.jp/cgi-bin/scat.rb/ruby/ruby-core/11960

http://pragdave.me/blog/2007/12/30/pipelines-using-fibers-in-ruby-19/
http://pragdave.me/blog/2008/01/01/pipelines-using-fibers-in-ruby-19part-ii/

http://classparser.blogspot.com/

http://msdn.microsoft.com/en-us/magazine/cc164086.aspx
Implementing Coroutines for .NET by Wrapping the Unmanaged Fiber API
Editor's Update - 9/16/2005:
The solution described in this article relies on undocumented functionality that is not supported by Microsoft at this time.
This article is intended for informational purposes only, and its contents should not be used to create production code.

http://www.crystalclearsoftware.com/soc/coroutine/coroutine/fibers.html


http://coco.luajit.org/index.html
Coco is a small extension to get True C Coroutine semantics for Lua 5.1.
True C coroutine semantics mean you can yield from a coroutine across a C call boundary
and resume back to it. Coco allows you to use a dedicated C stack for each coroutine.
Resuming a coroutine and yielding from a coroutine automatically switches C stacks.


http://aldrin.co/coroutine-pipeline.html

https://clang.llvm.org/docs/DebuggingCoroutines.html
