Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

Commit 8a42a20

Browse filesBrowse files
Trottruyadorno
authored andcommitted
doc: add comments to empty blocks in worker_threads text
PR-URL: #41831 Refs: https://eslint.org/docs/rules/no-empty Reviewed-By: Colin Ihrig <cjihrig@gmail.com> Reviewed-By: Tobias Nießen <tniessen@tnie.de> Reviewed-By: Antoine du Hamel <duhamelantoine1995@gmail.com>
1 parent c3721fc commit 8a42a20
Copy full SHA for 8a42a20

File tree

Expand file treeCollapse file tree

1 file changed

+6
-2
lines changed
Open diff view settings
Filter options
Expand file treeCollapse file tree

1 file changed

+6
-2
lines changed
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
@@ -1265,7 +1265,9 @@ import {
12651265

12661266
if (isMainThread) {
12671267
new Worker(new URL(import.meta.url));
1268-
for (let n = 0; n < 1e10; n++) {}
1268+
for (let n = 0; n < 1e10; n++) {
1269+
// Looping to simulate work.
1270+
}
12691271
} else {
12701272
// This output will be blocked by the for loop in the main thread.
12711273
console.log('foo');
@@ -1282,7 +1284,9 @@ const {
12821284

12831285
if (isMainThread) {
12841286
new Worker(__filename);
1285-
for (let n = 0; n < 1e10; n++) {}
1287+
for (let n = 0; n < 1e10; n++) {
1288+
// Looping to simulate work.
1289+
}
12861290
} else {
12871291
// This output will be blocked by the for loop in the main thread.
12881292
console.log('foo');

0 commit comments

Comments
0 (0)
Morty Proxy This is a proxified and sanitized view of the page, visit original site.