File tree Expand file tree Collapse file tree 1 file changed +4
-10
lines changed Expand file tree Collapse file tree 1 file changed +4
-10
lines changed Original file line number Diff line number Diff line change @@ -82,23 +82,17 @@ export class Scheduler implements SchedulerInterface {
8282 this . __stopRuntime = stopRuntime ;
8383 }
8484
85- /** Kill all current threads (without notifying any monitors), staying ready for spawning new
86- * threads. */
85+ /** Kill all threads except the current one, staying ready for spawning new threads.
86+ *
87+ * @note This does not notify the monitors. */
8788 resetScheduler ( ) {
88- // console.log (`The current length of __funloop is ${this.__funloop.length}`)
89- // console.log (`The number of active threads is ${Object.keys(this.__alive).length}`)
9089 for ( let x in this . __alive ) {
91- if ( this . __currentThread . tid . val . toString ( ) == x ) {
92- // console.log (x, "ACTIVE")
93- } else {
94- // console.log (x, "KILLING");
90+ if ( this . __currentThread . tid . val . toString ( ) !== x ) {
9591 delete this . __alive [ x ] ;
9692 }
9793 }
9894 this . __blocked = { } ;
9995 this . __funloop = [ ] ;
100- // console.log (`The number of active threads is ${Object.keys(this.__alive).length}`)
101- // console.log (`The number of blocked threads is ${this.__blocked.length}`)
10296 }
10397
10498 /*************************************************************************************************\
You can’t perform that action at this time.
0 commit comments