Hi all,
I would like to implement a gracefull mutex class - by gracefull I mean a mutex that avoids the kind of race hazards and CPU hammering that occur with simple code that loops like crazy until a flag is raised in another thread (AKA the newbie programmer's Mutex!).
In other words, how do I implement an atomic silent wait state with a timeout in javascript? Is there a built-in to do it or will I have to write it myself? I know how to do this in Assembly, C, C++, Java, Lisp and PHP but not Javascript!
I'm using AJAX, so perhaps there's a builtin within the AJAX object itself?
Many thanks,
Mike.