Hi, I have two different objects, one depends on the other, i.e the first must finish before the second goes past a certain point. These changes are in a .js file.

1) So how can I set up a semaphore or something to synchronise the two?
2) I currently have a boolean flag (which works ok) for the above purpose, the second object repeatedly checks the flag, sleeping between the checks. Ugly, a proper semaphore or event mechanism would be nice...


As an aside, re (2) above, since Javascript doesn't have a built-in sleep, I'm using a 'homebuilt' sleep but this is horrible (and must use a lot of CPU because the delay is large and Mozilla warns me that the javascript is running slowly, do I want to interrupt it?)

TIA
[BTW, code changes in 1.6 codebase]
_______________________________________________
Mozilla-xpcom mailing list
[EMAIL PROTECTED]
http://mail.mozilla.org/listinfo/mozilla-xpcom

Reply via email to