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 330c1bc

Browse filesBrowse files
Trottdanielleadams
authored andcommitted
doc: add comments to empty blocks in worker_threads text
PR-URL: #41831 Backport-PR-URL: #42160 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 125ed0c commit 330c1bc
Copy full SHA for 330c1bc

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
@@ -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)
Morty Proxy This is a proxified and sanitized view of the page, visit original site.