Re: Coroutines in Euphoria
- Posted by jimcbrown (admin) May 21, 2015
- 1421 views
irv said...
So, a coroutine would be somewhere between a Eu task and real threaded execution?
No, it's that an Eu task is somewhere between a coroutine and real threaded (preemptive and concurrent/parallel execution) execution. One could even argue that Eu tasks/Java green threads et al are attempts to simulate threading by using coroutines.
irv said...
If Eu actually had threads, would there be a need for coroutines?
Yes, they do different things and serve different purposes. co-routines always execute within the same thread, for example.