in reply to Re^4: Sharing large data structures between threads
in thread Sharing large data structures between threads

Coro provides what other languages call "Green Threads" or cooperative multitasking, which can be quite useful in keeping your (procedural) program flow while still allowing some parallelism in the sense that when one thread of execution blocks on IO, the interpreter can switch to another execution context. But there only ever is one thread executing at the same time.

I never gave both, the documentation of Coro nor the reviews much credit, because the documentation tries to redefine the term "thread" in a way that includes Coro, and the review simply does not know much about Coro.

Coro is quite useful, as it gives you some of the advantages of threads while avoiding the nasty disadvantages of threads, especially race conditions and missing locks cannot be problems with Coro, as all task switching is done explicitly.

  • Comment on Re^5: Sharing large data structures between threads

Replies are listed 'Best First'.
Re^6: Sharing large data structures between threads
by hermida (Scribe) on Mar 07, 2011 at 19:54 UTC
    Hey thank you for clarifying, now I know better and will remember this next time :)