Threads
Dar Scott
dsc at swcp.com
Fri Oct 13 12:21:37 EDT 2006
On Oct 12, 2006, at 5:25 PM, Viktoras Didziulis wrote:
> Threads can be produced by cloning
> an invisible substack (named "thread") with
> a handler and renaming the clones to thread_1, thread_2, etc...
This stack is a good mockup of what a simple threading capability
would look like like.
It also points out that much of what we would want in threading can
be done with 'send'. I have an old, but applicable primer on
"message mechanics", that is, building message machines here:
http://www.swcp.com/dsc/revstacks.html
Should anybody be interested, that is. Using 'message mechanics'
does require a different way of looking at a problem, perhaps making
a state machine. And it is not a full substitute for threads.
I have in my box of projects a new 'send' that has some issues fixed
and is broader in what can be sent to what. I was thinking of
expanding that so messages can be sent to "threads". I was thinking
of making "threads" out of command-line Revolution, much as the cgi
folks do. I have tinkered with command-line Rev on OS X and I think
this approach may have promise.
Of course, resources would not be as intimately shared as in some
threading models. But to be able to say, go off and do this FFT,
would be nice.
Of course, the mad scientist is flighty in these projects so don't
count on anything.
Dar
More information about the use-livecode
mailing list