Function to wrap a function within a Mojo.Function.Synchronize object so that it is called simultaneously with all other wrapped callbacks. Returns wrapped Function that can be passed instead of the original callback function.
Parameter | Type | Description |
---|---|---|
callback | Function | Function to be wrapped and synchronized. |
Example usage:
var synchronizer = new Mojo.Function.Synchronize({
syncCallback: this.continueSceneTransition()});
var doNothing = function() {};
var otherWrapper = synchronizer.wrap(doNothing);
curScene.aboutToActivate(synchronizer.wrap(doNothing));
beginOtherOperation(otherWrapper);
0 Comments