| FazBrowse GitHub Viewer | Trending | | Home |
| Tools: [Download Repo ZIP] [Original HTTPS Page] |
1 parent 1ca116a commit 831a0d3
1 file changed
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
@@ -11,7 +11,7 @@ const { MessageChannel } = require('worker_threads'); | |||
| 11 | 11 | ||
| 12 | 12 | const { port1, port2 } = new MessageChannel(); | |
| 13 | 13 | let count = 0; | |
| 14 | - port1.on('message', () => { | ||
| 14 | + port1.on('message', common.mustCallAtLeast(() => { | ||
| 15 | 15 | if (count === 0) { | |
| 16 | 16 | setTimeout(common.mustCall(() => { | |
| 17 | 17 | port1.close(); | |
@@ -20,7 +20,7 @@ port1.on('message', () => { | |||
| 20 | 20 | ||
| 21 | 21 | port2.postMessage(0); | |
| 22 | 22 | assert(count++ < 10000, `hit ${count} loop iterations`); | |
| 23 | - }); | ||
| 23 | + })); | ||
| 24 | 24 | ||
| 25 | 25 | port2.postMessage(0); | |
| 26 | 26 | ||
| Back | FazBrowse Home | New Git URL |
0 commit comments