Sean Wilkinson avatar Sean Wilkinson committed 521d2a6

Updated explanation for `revive`

Comments (0)

Files changed (1)

     revive = function () {
      // This function contains the execution center for Quanah. It's pretty
      // simple, really -- it just runs the first available task in its queue
-     // (`queue`), and it selects an execution context conditionally. That's
-     // all it does. It makes no attempt to run every task in the queue every
-     // time it is called, because instead Quanah uses a strategy in which it
-     // tries to call `revive` as many times as necessary to process an entire
-     // program correctly. For example, every time an avar receives a `comm`
-     // message, `revive` will run. Because `revive` only runs a single task
-     // from the queue for each invocation, its queue can be shared safely
-     // across multiple execution "contexts" simultaneously, and it makes no
-     // difference if the separate contexts are due to recursion or to special
-     // objects such as Web Workers. The `revive` function selects a context
-     // for execution using conditional tests that determine whether a given
-     // computation can be distributed to external resources for execution, and
-     // if they cannot be distributed, execution occurs on the local machine.
+     // (`queue`) in an execution context appropriate for that particular task.
+     // That's all it does. It makes no attempt to run every task in the queue
+     // every time it is called, because instead it assumes it will be called
+     // repeatedly until the entire program has executed. For example, every
+     // time an avar receives a `comm` message, `revive` will run. Because
+     // `revive` only runs a single task from its queue for each invocation,
+     // that queue can be shared safely across multiple execution contexts
+     // simultaneously, and it makes no difference if the separate contexts are
+     // due to recursion or to special objects such as Web Workers. The
+     // `revive` function selects an execution context using conditional tests
+     // that determine whether a given task can be distributed faithfully to
+     // external resources for execution or not; if a task cannot be
+     // distributed faithfully, then it will be executed by the local machine.
         var task = queue.shift();
         if (task !== undefined) {
             if (can_run_remotely(task)) {
Tip: Filter by directory path e.g. /media app.js to search for public/media/app.js.
Tip: Use camelCasing e.g. ProjME to search for ProjectModifiedEvent.java.
Tip: Filter by extension type e.g. /repo .js to search for all .js files in the /repo directory.
Tip: Separate your search with spaces e.g. /ssh pom.xml to search for src/ssh/pom.xml.
Tip: Use ↑ and ↓ arrow keys to navigate and return to view the file.
Tip: You can also navigate files with Ctrl+j (next) and Ctrl+k (previous) and view the file with Ctrl+o.
Tip: You can also navigate files with Alt+j (next) and Alt+k (previous) and view the file with Alt+o.