This class implements a wrapper around the Gears Worker Pool.
extends goog.events.EventTargetInstance Method Summary | |
allowCrossOrigin() Allows the worker who calls this to be used cross origin. | |
createWorker(string code) ⇒ ?goog.gears.Worker Creates a new worker. | |
createWorkerFromUrl(string url) ⇒ ?goog.gears.Worker Creates a new worker from a URL. | |
disposeInternal() Unattach listeners from this object. Classes that extend EventTarget may need to override this method in order to remove references to DOM Elements and additional listeners, it should be something like this: MyClass.prototype.disposeInternal = function() { MyClass.superClass_.disposeInternal.call(this); // Dispose logic for MyClass }; | |
getGearsWorkerPool() ⇒ ?GearsWorkerPool | |
handleMessage_(string message, number senderId, ?GearsMessageObject messageObject) Callback when this worker recieves a message. | |
registerWorker(?goog.gears.Worker worker) Registers a worker object. | |
sendMessage(<Any Type> message, ?goog.gears.Worker worker) Sends a message to a given worker. | |
setErrorHandler(function (GearsErrorObject): boolean fn, ?Object= opt_handler) Sets a last-chance error handler for a worker pool. WARNING: This will only succeed from inside a worker thread. In main thread, use window.onerror handler. | |
unregisterWorker(?goog.gears.Worker worker) Unregisters a worker object. |