On 20 Dec 2005, at 16:27, Alan Skinner wrote:
Hi,
Easy question for the Gurus ;o)
If I have a number Timeouts running at the same and they all access
say
the same List.
Does director run them off a single thread or might it possibly use
multiple threads to run them?
Im talking mutual exclusion or critical sections here. Can both my
timeouts modify the same data safely?
There is no provision for critical sections in lingo so I was
hoping it
would only run one timer callback function at a time until it was
completed before it went on to the next one, but that might not be
very
efficient?
Does anybody have any ideas about this type of thing?
It is my understanding that one movie stands for one thread. So if
you need more than one thread you'ld open a new window
Timers inside one movie pertain all to that movies timeoutlist and I
think those timeouts are processed sequentially
So you could indeed force a situation where one datalist (global) is
accessed from multiple threads (= windows)
hmmm, I don't know what would happen when multiple threads try to
alter the same global.
I suppose the safest thing to do would be to build your own flag
system (one thread wants to write to a global, raises the flag,
writes, lowers the flag, variable available for next thread that
wants to write)
hth
Bart Pietercil
[To remove yourself from this list, or to change to digest mode, go to
http://www.penworks.com/lingo-l.cgi To post messages to the list, email
lingo-l@penworks.com (Problems, email [EMAIL PROTECTED]). Lingo-L is for
learning and helping with programming Lingo. Thanks!]