Re: Coroutines in Euphoria

new topic     » goto parent     » topic index » view thread      » older message » newer message
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.

new topic     » goto parent     » topic index » view thread      » older message » newer message

Search



Quick Links

User menu

Not signed in.

Misc Menu