+// 1) If T is not runnable, queue it on the appropriate token.
+
+// 2) Otherwise, T is runnable. If *PRET is not NULL, then we have
+// already decided which Task to run next. Add T to the list of
+// runnable tasks, and signal another thread.
+
+// 3) Otherwise, *PRET is NULL. If IS_BLOCKER is false, then T was
+// waiting on a write lock. We can grab that lock now, so we run T
+// now.
+
+// 4) Otherwise, IS_BLOCKER is true. If we should run T soon, then
+// run it now.
+
+// 5) Otherwise, check whether there are other tasks to run. If there
+// are, then we generally get a better ordering if we run those tasks
+// now, before T. A typical example is tasks waiting on the Dirsearch
+// blocker. We don't want to run those tasks right away just because
+// the Dirsearch was unblocked.
+
+// 6) Otherwise, there are no other tasks to run, so we might as well
+// run this one now.
+
+// This function must be called with the Workqueue lock held.
+
+// Return true if we set *PRET to T, false otherwise.
+
+bool
+Workqueue::return_or_queue(Task* t, bool is_blocker, Task** pret)