On Mon, Oct 5, 2009 at 11:42 PM, John Rose <[email protected]> wrote:
> > 2) Can a coroutine resume any other coroutine (full coroutines, > > symmetric coroutines), or only the coroutine that invoked it > > (semi-coroutines, asymmetric coroutines, semi-symmetric coroutines)? > > That's a good question. Does anyone know what the C# answer to that > is (for yielding iterators)? > A "yield return" in a C# iterator returns control to the caller of MoveNext. That is the equivalent of returning control to the caller of Java's Enumerator.hasNext. In other words, to the invoker. However, the invoker isn't typically an iterator method (coroutine). This is flexible enough to enable the creation of frameworks that simulate symmetric coroutines, though with a bit of boilerplate in clients at the yield points. Eliminating that boilerplate is one of the things I'm working on. --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "JVM Languages" group. To post to this group, send email to [email protected] To unsubscribe from this group, send email to [email protected] For more options, visit this group at http://groups.google.com/group/jvm-languages?hl=en -~----------~----~----~----~------~----~------~--~---
