@@ -230,17 +230,16 @@ export class Scheduler implements SchedulerInterface {
230230
231231 /** Start the main scheduler loop.
232232 *
233- * HACK (2018-02-18: AA): a hypothesis about memory management in V8
233+ * HACK (2018-02-18: AA): a hypothesis about memory management in V8:
234234 *
235- * It appears that V8's memory management is not very well suited for infinitely
236- * running functions. In other words, functions are expected to eventually
237- * terminate, and all long-running computations are expected to run through the
238- * event loop. This is not surprising given the application where V8 is used.
239- * This is why we periodically yield to the event loop; this hack appears to let
240- * GC claim the objects allocated throughout the runtime of this function. Note
241- * that without this hack, we are observing memory leaks for many "server"-like
242- * programs; with the hack, we get a waivy memory consumption profile that reaches
243- * around 50M on the low points of the wave.
235+ * It appears that V8's memory management is not very well suited for infinitely running
236+ * functions. In other words, functions are expected to eventually terminate, and all
237+ * long-running computations are expected to run through the event loop. This is not
238+ * surprising given the application where V8 is used. This is why we periodically yield to
239+ * the event loop; this hack appears to let GC claim the objects allocated throughout the
240+ * runtime of this function. Note that without this hack, we are observing memory leaks for
241+ * many "server"-like programs; with the hack, we get a waivy memory consumption profile
242+ * that reaches around 50M on the low points of the wave.
244243 */
245244 loop ( ) {
246245 const maxThreadsPerLoop = 500000 ;
0 commit comments