mirror of
https://github.com/atom/atom.git
synced 2026-02-16 17:45:24 -05:00
This commit makes all interactions between Task and Worker look like method calls. The worker now has a global `callTaskMethod` function that it can use to call methods on the Task object. And the Task can use `callWorkerMethod` to call methods on a global `handler` object in the worker. The worker's initial `handler` actually contains the `start` method, which the Task initially calls to kick things off. Then the global `handler` gets replaced with whatever `handlerPath` is specified by the Task. The worker then calls `workerStarted` on its parent Task object. This commit also gets rid of the `onProgress` method with the reply semantics, favoring a more explicit interaction. When `snippetsLoaded` finishes adding the snippet data, we call `loadNextPackageSnippets` explicitly rather than returning a reply message.