Class MVCMutex
Object
|
+--GrvObject
|
+--MVCMutex
- class
MVCMutex
- extends GrvObject
This class encapsulates a Map of mutual exclusion data;
It self-registers instantiations into a static Map;
This class implements
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.
Version: 2.0
Author: Bruce Wallace (PolyGlotInc.com)
See:
Defined in grvMVC.js
|
Field Summary |
<static> Object |
Map
|
|
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 )
|
<static> void
|
CpuSlice( <int> cmdID, <int> optStartID )
Static method to give a slice of CPU to mutex with given ID
|
Map
<static> Object Map
MVCMutex
MVCMutex()
Version: 2.0
Author: Bruce Wallace (PolyGlotInc.com)
See:
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
CpuSlice
<static> void CpuSlice( <int> cmdID, <int> optStartID )
Static method to give a slice of CPU to mutex with given ID
Parameters:
cmdID - ID of command to resume
optStartID - optional ID of command on which we are waiting; if not specified then start at top of list of all pending commands.
Documentation generated by
JSDoc on Sun Feb 11 13:31:25 2007