Re: [livecode] Fwd: IEEE1588 patent encumbered -- project needs different leader

From: Graham Wakefield <wakefield_at_mat.ucsb.edu>
Date: Fri, 22 Jan 2010 11:28:04 -0800

I think it is properly called collaborative multi-tasking (whereas
'threads' as usually understood today means preemptive multi-tasking),
the difference being whether tasks explicitly yield themselves or are
implicitly interrupted. Collaborative multi-tasking is often
implemented using coroutines.
Implementations go back at least as far as the 60's, maybe further.

A 'shred', as far as I can tell, is no more than a coroutine managed
by a scheduler, which maintains a priority queue (indexed by
timestamps) of such coroutines. 'sporking' is scheduling new
coroutines. We use the same scheduler architecture in LuaAV (but using
the coroutine types built into the Lua language of course; which also
allows tail-calls between coroutines, and thus also temporal recursion
as in Impromptu).

IMHO it is a very good design for programming with time, but OTOH I'm
not convinced that neologisms are really needed...


On Jan 22, 2010, at 5:26 AM, Kassen wrote:

> Shreds really are different enough from threads to warrant a
> different name. "spork" starts a new process (like forking) but it's
> a child process of the one starting it and shares the namespace of
> the context that started it (though the reverse doesn't hold true).
> We like our cute words, but it's not like we just use them because
> they are cute. Threads are cool because they (can) run at the same
> time, shreds on the other hand run in parallel but behind the scenes
> they run in turn in a very deterministic way so that's almost like a
> opposite from that perspective. If you pretend they are the same and
> keep reasoning from that perspective then there will be issues.
> You're just jealous you guys don't have have funny words :-p.
Received on Fri Jan 22 2010 - 19:28:35 GMT

This archive was generated by hypermail 2.4.0 : Sun Aug 20 2023 - 16:02:23 BST