Class Mutex
Object
|
+--OObject
|
+--Mutex
- class
Mutex
- extends OObject
This class encapsulates a Map of mutual exclusion data;
It self-registers instantiations into a static Map;
This class implements the
Wallace variation of Lamport's bakery algorithm for mutual exclusion;
It is used to execute Command objects while making sure
that no other Command objects (that are using Mutex)
are executed at the same time.
NOTE: our main use for this is to keep background AJAX
processing from confusing foreground UI processing,
which can otherwise occur because both are making data
model changes simultaneously.
See:
Author: Bruce Wallace (PolyGlotInc.com)
Defined in mvc.js
Version: 1.0
|
Constructor Summary |
Mutex
()
|
|
Method Summary |
void
|
cpuSlice( <int> optStartID )
continue the processing of "this" mutex/command object
|
void
|
invoke()
launch the processing of "this" mutex/command object
|
void
|
konstructor( <Command> cmdObj, <String> methodName, <boolean> optInhibitInvoke )
|
Mutex
Mutex()
See:Author: Bruce Wallace (PolyGlotInc.com)
Version: 1.0
cpuSlice
void cpuSlice( <int> optStartID )
continue the processing of "this" mutex/command object
Parameters:
optStartID - optional ID of last command we were waiting on; if not specified then start at top of list of all pending mutex/commands.
invoke
void invoke()
launch the processing of "this" mutex/command object
konstructor
void konstructor( <Command> cmdObj, <String> methodName, <boolean> optInhibitInvoke )
Parameters:
cmdObj - Command object to be wrapped in Mutex
methodName - name of method being run on cmdObj
optInhibitInvoke - optional flag that if true will inhibit immediate launching of cmdObj by this constructor
Documentation generated by
JSDoc on Fri Mar 17 06:40:21 2006