Skip to content

Commit 6de18f6

Browse files
committed
Clean up comments for 'resetScheduler'
1 parent dec70bf commit 6de18f6

File tree

1 file changed

+4
-10
lines changed

1 file changed

+4
-10
lines changed

rt/src/Scheduler.mts

Lines changed: 4 additions & 10 deletions
Original file line numberDiff line numberDiff 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
/*************************************************************************************************\

0 commit comments

Comments
 (0)