Commit 84b7070
src: add helper for addons to get the event loop
Add a utility functions for addons to use when they need
a reference to the current event loop.
Currently, `uv_default_loop()` works if the embedder is the
single-threaded default node executable, but even without
the presence of e.g. workers that might not really an API
guarantee for when Node is embedded.
PR-URL: #17109
Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl>
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>1 parent 362b8c7 commit 84b7070Copy full SHA for 84b7070
File tree
Expand file treeCollapse file tree
4 files changed
+18
-2
lines changedOpen diff view settings
Filter options
- src
- test/addons
- async-hello-world
- callback-scope
Expand file treeCollapse file tree
4 files changed
+18
-2
lines changedOpen diff view settings
Collapse file
+9Lines changed: 9 additions & 0 deletions
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| ||
4670 | 4670 | |
4671 | 4671 | |
4672 | 4672 | |
| 4673 | + |
| 4674 | + |
| 4675 | + |
| 4676 | + |
| 4677 | + |
| 4678 | + |
| 4679 | + |
| 4680 | + |
| 4681 | + |
4673 | 4682 | |
4674 | 4683 | |
4675 | 4684 | |
|
Collapse file
+4Lines changed: 4 additions & 0 deletions
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| ||
248 | 248 | |
249 | 249 | |
250 | 250 | |
| 251 | + |
| 252 | + |
| 253 | + |
| 254 | + |
251 | 255 | |
252 | 256 | |
253 | 257 | |
|
Collapse file
test/addons/async-hello-world/binding.cc
Copy file name to clipboardExpand all lines: test/addons/async-hello-world/binding.cc+1-1Lines changed: 1 addition & 1 deletion
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| ||
77 | 77 | |
78 | 78 | |
79 | 79 | |
80 | | - |
| 80 | + |
81 | 81 | |
82 | 82 | |
83 | 83 | |
|
Collapse file
test/addons/callback-scope/binding.cc
Copy file name to clipboardExpand all lines: test/addons/callback-scope/binding.cc+4-1Lines changed: 4 additions & 1 deletion
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| ||
52 | 52 | |
53 | 53 | |
54 | 54 | |
55 | | - |
| 55 | + |
| 56 | + |
| 57 | + |
| 58 | + |
56 | 59 | |
57 | 60 | |
58 | 61 | |
|
0 commit comments