| FazBrowse GitHub Viewer | Trending | | Home |
| Tools: [Download Repo ZIP] [Original HTTPS Page] |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
@@ -1455,8 +1455,7 @@ async function foo(emitter, event, signal) { | |||
| 1455 | 1455 | } | |
| 1456 | 1456 | ||
| 1457 | 1457 | foo(ee, 'foo', ac.signal); | |
| 1458 | - ac.abort(); // Abort waiting for the event | ||
| 1459 | - ee.emit('foo'); // Prints: Waiting for the event was canceled! | ||
| 1458 | + ac.abort(); // Prints: Waiting for the event was canceled! | ||
| 1460 | 1459 | ``` | |
| 1461 | 1460 | ||
| 1462 | 1461 | ```cjs | |
@@ -1479,8 +1478,7 @@ async function foo(emitter, event, signal) { | |||
| 1479 | 1478 | } | |
| 1480 | 1479 | ||
| 1481 | 1480 | foo(ee, 'foo', ac.signal); | |
| 1482 | - ac.abort(); // Abort waiting for the event | ||
| 1483 | - ee.emit('foo'); // Prints: Waiting for the event was canceled! | ||
| 1481 | + ac.abort(); // Prints: Waiting for the event was canceled! | ||
| 1484 | 1482 | ``` | |
| 1485 | 1483 | ||
| 1486 | 1484 | ### Awaiting multiple events emitted on `process.nextTick()` | |
| Back | FazBrowse Home | New Git URL |
0 commit comments