code: function (sName, fnCallback) {
  		var aTasks = [],
  			iOpenTasks = 0,
  			iFailures = 0;
  
  		this.startTask = function(sTitle) {
  			var iId = aTasks.length;
  			aTasks[iId] = { name : sTitle, finished : false };
  			iOpenTasks++;
  			return iId;
  		};
  
  		this.finishTask = function(iId, bSuccess) {
  			if ( !aTasks[iId] || aTasks[iId].finished ) {
  				throw new Error("trying to finish non existing or already finished task");
  			}
  			aTasks[iId].finished = true;
  			iOpenTasks--;
  			if ( bSuccess === false ) {
  				iFailures++;
  			}
  			if ( iOpenTasks === 0 ) {
  				Log.info("Sync point '" + sName + "' finished (tasks:" + aTasks.length + ", open:" + iOpenTasks + ", failures:" + iFailures + ")");
  				finish();
  			}
  		};
  
  		function finish() {
  			if ( fnCallback ) {
  				fnCallback(iOpenTasks, iFailures);
  			}
  			fnCallback = null;
  		}
  
  		Log.info("Sync point '" + sName + "' created");
  	}
docs: /*
  Internal class that can help to synchronize a set of asynchronous tasks.
  Each task must be registered in the sync point by calling startTask with
  an (purely informative) title. The returned value must be used in a later
  call to finishTask.
  When finishTask has been called for all tasks that have been started,
  the fnCallback will be fired.
  When a timeout is given and reached, the callback is called at that
  time, no matter whether all tasks have been finished or not.