Source/Core/TaskProcessor.js
/**
 * A wrapper around a web worker that allows scheduling tasks for a given worker,
 * returning results asynchronously via a promise.
 *
 * The Worker is not constructed until a task is scheduled.
 *
 * @alias TaskProcessor
 * @constructor
 *
 * @param {String} workerName The name of the worker.  This is expected to be a script
 *                            in the Workers folder.
 * @param {Number} [maximumActiveTasks=5] The maximum number of active tasks.  Once exceeded,
 *                                        scheduleTask will not queue any more tasks, allowing
 *                                        work to be rescheduled in future frames.
 */
A wrapper around a web worker that allows scheduling tasks for a given worker,
returning results asynchronously via a promise.

The Worker is not constructed until a task is scheduled.



@param {String} workerName The name of the worker.  This is expected to be a script
in the Workers folder.
@param {Number} [maximumActiveTasks=5] The maximum number of active tasks.  Once exceeded,
scheduleTask will not queue any more tasks, allowing
work to be rescheduled in future frames.
A wrapper around a web worker that allows scheduling tasks for a given worker returning results asynchronously via a promise . The Worker is not constructed until a task is scheduled . @param { String } workerName The name of the worker . This is expected to be a script in the Workers folder . @param { Number } [ maximumActiveTasks = 5 ] The maximum number of active tasks . Once exceeded scheduleTask will not queue any more tasks allowing work to be rescheduled in future frames .
function TaskProcessor(workerName, maximumActiveTasks) {
  this._workerName = workerName;
  this._maximumActiveTasks = defaultValue(maximumActiveTasks, 5);
  this._activeTasks = 0;
  this._deferreds = {};
  this._nextID = 0;
}
function TaskProcessor ( workerName , maximumActiveTasks ) { this . _workerName = workerName ; this . _maximumActiveTasks = defaultValue ( maximumActiveTasks , 5 ) ; this . _activeTasks = 0 ; this . _deferreds = { } ; this . _nextID = 0 ; }
A wrapper around a web worker that allows scheduling tasks for a given worker,
 returning results asynchronously via a promise.
A wrapper around a web worker that allows scheduling tasks for a given worker returning results asynchronously via a promise .