Commit 522e3d3
timers: reuse timer in
Instead of creating new timer - reuse the timer from the freelist. This
won't make the freelist timer active for the duration of `uv_close()`,
and will let the event-loop exit properly.
Fix: #1264
PR-URL: #3407
Reviewed-By: Trevor Norris <trev.norris@gmail.com>
Reviewed-By: Jeremiah Senkpiel <fishrock123@rocketmail.com>setTimeout().unref()
1 parent b483afc commit 522e3d3Copy full SHA for 522e3d3
File tree
Expand file treeCollapse file tree
2 files changed
+42
-7
lines changedOpen diff view settings
Filter options
- lib
- test/parallel
Expand file treeCollapse file tree
2 files changed
+42
-7
lines changedOpen diff view settings
Collapse file
+22-7Lines changed: 22 additions & 7 deletions
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| ||
119 | 119 | |
120 | 120 | |
121 | 121 | |
122 | | - |
| 122 | + |
123 | 123 | |
124 | 124 | |
125 | 125 | |
126 | | - |
127 | | - |
| 126 | + |
128 | 127 | |
| 128 | + |
| 129 | + |
| 130 | + |
| 131 | + |
| 132 | + |
| 133 | + |
| 134 | + |
| 135 | + |
| 136 | + |
| 137 | + |
| 138 | + |
| 139 | + |
| 140 | + |
129 | 141 | |
130 | 142 | |
131 | | - |
132 | 143 | |
133 | 144 | |
134 | 145 | |
| ||
312 | 323 | |
313 | 324 | |
314 | 325 | |
315 | | - |
316 | 326 | |
317 | 327 | |
318 | | - |
| 328 | + |
| 329 | + |
| 330 | + |
| 331 | + |
| 332 | + |
| 333 | + |
319 | 334 | |
320 | | - |
| 335 | + |
321 | 336 | |
322 | 337 | |
323 | 338 | |
|
Collapse file
test/parallel/test-timers-unrefed-in-beforeexit.js
Copy file name to clipboard+20Lines changed: 20 additions & 0 deletions
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| ||
| 1 | + |
| 2 | + |
| 3 | + |
| 4 | + |
| 5 | + |
| 6 | + |
| 7 | + |
| 8 | + |
| 9 | + |
| 10 | + |
| 11 | + |
| 12 | + |
| 13 | + |
| 14 | + |
| 15 | + |
| 16 | + |
| 17 | + |
| 18 | + |
| 19 | + |
| 20 | + |
0 commit comments