Re:C++ Coroutines Do Not Spark Joy
by int_19h on Friday April 05, 2024 @06:50AM
(#39940861)
A C# iterator is a coroutine. A coroutine is a simply a function that can be suspended at a given point and resumed later. Iterators do exactly that at the point where you use "yield return".
Re:C++ Coroutines Do Not Spark Joy
by jayd16 on Friday April 05, 2024 @11:11AM
(#39943376)
My point is mostly that neither is called a coroutine in the language and if you Google C# coroutine you'll see mostly Unity results which are not official and may or may not be what the author was referring to.
A C# async method is also a coroutine.