GV

GeezerVison

The World Wide Web, restored to 800 pixels of glory.

Home|About|Gaming cabinet|Archives|How it works|Starter sites

On this site

  • Sign in
  • ActionsCI/CD and automation
  • CodespacesCloud development environments
  • All Features
  • Documentation
  • Training
  • Certifications
  • Build with Copilot
  • Customize Copilot
  • Integrations
  • Trending repos
  • GitHub Sponsors
  • Developer articles
  • Enterprises

This view

  • Original page
  • New address

GeezerVison is showing github.com — doc: add comments to empty blocks in worker_threads text · nodejs/node@330c1bc

File tree

Expand file treeCollapse file tree
Open diff view settings
Filter options
  • doc/api
    • worker_threads.md
Expand file treeCollapse file tree
Open diff view settings
Collapse file

‎doc/api/worker_threads.md‎

Copy file name to clipboardExpand all lines: doc/api/worker_threads.md
+6-2Lines changed: 6 additions & 2 deletions
  • Display the source diff
  • Display the rich diff
Original file line numberDiff line numberDiff line change
@@ -1255,7 +1255,9 @@ import {
12551255

12561256
if (isMainThread) {
12571257
new Worker(new URL(import.meta.url));
1258-
for (let n = 0; n < 1e10; n++) {}
1258+
for (let n = 0; n < 1e10; n++) {
1259+
// Looping to simulate work.
1260+
}
12591261
} else {
12601262
// This output will be blocked by the for loop in the main thread.
12611263
console.log('foo');
@@ -1272,7 +1274,9 @@ const {
12721274

12731275
if (isMainThread) {
12741276
new Worker(__filename);
1275-
for (let n = 0; n < 1e10; n++) {}
1277+
for (let n = 0; n < 1e10; n++) {
1278+
// Looping to simulate work.
1279+
}
12761280
} else {
12771281
// This output will be blocked by the for loop in the main thread.
12781282
console.log('foo');

0 commit comments

Comments
0 (0)
You are visitor 01402503 — GeezerVison does not store the pages you look up.
Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required.