An idea on multithreading implementation

Jeffrey Massung massung at gmail.com
Fri Jan 28 02:16:21 EST 2011


On Jan 27, 2011, at 10:54 PM, Geoff Canyon Rev wrote:

> I'd suggest coroutines: http://en.wikipedia.org/wiki/Coroutine
> 
> They have the advantage of being fairly similar to what some of us have done
> already with send.in to get this sort of behavior, and probably wouldn't
> break existing syntax.


Coroutines have absolutely no advantage over what's already provided by LC. There's zero difference between saying "yield()" and "wait 0 ticks with messages". 

The purpose of mutli-threading is to take advantage of one or more of the following: a completely separate hardware thread (program/code runs 100% in parallel with another program/set of code - the only bottlenecks being memory and I/O) or preemptive threading, typically by way of hyper-threading on a single hardware thread (basically letting the hardware or OS decide when to context switch for you).

Sorry. :-(

Jeff M.





More information about the use-livecode mailing list