We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent c3721fc commit 8a42a20Copy full SHA for 8a42a20
doc/api/worker_threads.md
@@ -1265,7 +1265,9 @@ import {
1265
1266
if (isMainThread) {
1267
new Worker(new URL(import.meta.url));
1268
- for (let n = 0; n < 1e10; n++) {}
+ for (let n = 0; n < 1e10; n++) {
1269
+ // Looping to simulate work.
1270
+ }
1271
} else {
1272
// This output will be blocked by the for loop in the main thread.
1273
console.log('foo');
@@ -1282,7 +1284,9 @@ const {
1282
1284
1283
1285
1286
new Worker(__filename);
1287
1288
1289
1290
1291
1292
0 commit comments