diff --git a/src/stdlib/task-shell.coffee b/src/stdlib/task-shell.coffee index 83f36327c..6ac2d5f6e 100644 --- a/src/stdlib/task-shell.coffee +++ b/src/stdlib/task-shell.coffee @@ -1,3 +1,10 @@ +# This file is loaded within Task's worker process. It will attempt to invoke +# any message with a 'method' and 'args' key on the global `handler` object. The +# initial `handler` object contains the `start` method, which is called by the +# task itself to relay information from the window thread and bootstrap the +# worker's environment. The `start` method then replaces the handler with an +# object required from the given `handlerPath`. + global.window = {} global.attachEvent = -> console = diff --git a/src/stdlib/task.coffee b/src/stdlib/task.coffee index e2f0b4a40..8216a4f15 100644 --- a/src/stdlib/task.coffee +++ b/src/stdlib/task.coffee @@ -4,7 +4,7 @@ EventEmitter = require 'event-emitter' fs = require 'fs-utils' module.exports = -class ProcessTask +class Task aborted: false constructor: (@path) -> @@ -58,4 +58,4 @@ class ProcessTask @worker = null @trigger 'task-completed' -_.extend ProcessTask.prototype, EventEmitter +_.extend Task.prototype, EventEmitter