Commit 2177138
timers: allow Immediates to be unrefed
Refactor Immediates handling to allow for them to be unrefed, similar
to setTimeout, but without extra handles.
Document the new `immediate.ref()` and `immediate.unref()` methods.
Add SetImmediateUnref on the C++ side.
Backport-PR-URL: #19006
PR-URL: #18139
Reviewed-By: Anna Henningsen <anna@addaleax.net>
Reviewed-By: Franziska Hinkelmann <franziska.hinkelmann@gmail.com>
Reviewed-By: James M Snell <jasnell@gmail.com>1 parent d2475cc commit 2177138
File tree
10 files changed
+249
-102
lines changed- doc/api
- lib
- src
- test
- addons-napi/test_uv_loop
- parallel
10 files changed
+249
-102
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
18 | 18 | | |
19 | 19 | | |
20 | 20 | | |
| 21 | + | |
| 22 | + | |
| 23 | + | |
| 24 | + | |
| 25 | + | |
| 26 | + | |
| 27 | + | |
| 28 | + | |
| 29 | + | |
| 30 | + | |
| 31 | + | |
| 32 | + | |
| 33 | + | |
| 34 | + | |
| 35 | + | |
| 36 | + | |
| 37 | + | |
| 38 | + | |
| 39 | + | |
| 40 | + | |
| 41 | + | |
| 42 | + | |
| 43 | + | |
| 44 | + | |
| 45 | + | |
| 46 | + | |
| 47 | + | |
| 48 | + | |
| 49 | + | |
| 50 | + | |
| 51 | + | |
| 52 | + | |
21 | 53 | | |
22 | 54 | | |
23 | 55 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
52 | 52 | | |
53 | 53 | | |
54 | 54 | | |
55 | | - | |
| 55 | + | |
| 56 | + | |
56 | 57 | | |
57 | | - | |
| 58 | + | |
58 | 59 | | |
59 | 60 | | |
| 61 | + | |
| 62 | + | |
60 | 63 | | |
61 | 64 | | |
62 | 65 | | |
| |||
690 | 693 | | |
691 | 694 | | |
692 | 695 | | |
693 | | - | |
| 696 | + | |
694 | 697 | | |
695 | 698 | | |
696 | 699 | | |
697 | 700 | | |
698 | 701 | | |
699 | | - | |
700 | | - | |
701 | | - | |
702 | | - | |
703 | | - | |
| 702 | + | |
| 703 | + | |
704 | 704 | | |
705 | | - | |
706 | | - | |
| 705 | + | |
| 706 | + | |
707 | 707 | | |
708 | 708 | | |
709 | 709 | | |
710 | 710 | | |
711 | | - | |
| 711 | + | |
| 712 | + | |
| 713 | + | |
| 714 | + | |
| 715 | + | |
| 716 | + | |
712 | 717 | | |
713 | 718 | | |
714 | 719 | | |
715 | | - | |
716 | | - | |
717 | | - | |
718 | | - | |
719 | | - | |
720 | | - | |
| 720 | + | |
721 | 721 | | |
722 | 722 | | |
| 723 | + | |
| 724 | + | |
723 | 725 | | |
724 | 726 | | |
725 | 727 | | |
726 | 728 | | |
727 | 729 | | |
728 | | - | |
| 730 | + | |
729 | 731 | | |
730 | 732 | | |
731 | 733 | | |
| |||
734 | 736 | | |
735 | 737 | | |
736 | 738 | | |
737 | | - | |
738 | | - | |
739 | | - | |
740 | | - | |
741 | | - | |
742 | | - | |
743 | | - | |
| 739 | + | |
| 740 | + | |
744 | 741 | | |
745 | 742 | | |
746 | | - | |
747 | | - | |
748 | | - | |
749 | | - | |
750 | | - | |
751 | | - | |
| 743 | + | |
| 744 | + | |
| 745 | + | |
| 746 | + | |
| 747 | + | |
| 748 | + | |
| 749 | + | |
| 750 | + | |
| 751 | + | |
| 752 | + | |
| 753 | + | |
752 | 754 | | |
753 | 755 | | |
754 | 756 | | |
| |||
763 | 765 | | |
764 | 766 | | |
765 | 767 | | |
766 | | - | |
767 | | - | |
768 | | - | |
769 | | - | |
770 | | - | |
771 | | - | |
772 | | - | |
773 | | - | |
774 | | - | |
| 768 | + | |
| 769 | + | |
| 770 | + | |
| 771 | + | |
| 772 | + | |
| 773 | + | |
| 774 | + | |
| 775 | + | |
| 776 | + | |
| 777 | + | |
| 778 | + | |
| 779 | + | |
| 780 | + | |
| 781 | + | |
| 782 | + | |
| 783 | + | |
| 784 | + | |
| 785 | + | |
| 786 | + | |
| 787 | + | |
775 | 788 | | |
776 | | - | |
777 | | - | |
778 | | - | |
779 | | - | |
780 | | - | |
781 | | - | |
782 | | - | |
| 789 | + | |
| 790 | + | |
| 791 | + | |
| 792 | + | |
783 | 793 | | |
784 | 794 | | |
785 | | - | |
786 | | - | |
787 | | - | |
| 795 | + | |
| 796 | + | |
| 797 | + | |
| 798 | + | |
| 799 | + | |
| 800 | + | |
| 801 | + | |
| 802 | + | |
788 | 803 | | |
789 | | - | |
790 | | - | |
| 804 | + | |
| 805 | + | |
| 806 | + | |
| 807 | + | |
| 808 | + | |
| 809 | + | |
| 810 | + | |
| 811 | + | |
| 812 | + | |
791 | 813 | | |
792 | 814 | | |
793 | 815 | | |
| |||
827 | 849 | | |
828 | 850 | | |
829 | 851 | | |
830 | | - | |
| 852 | + | |
| 853 | + | |
831 | 854 | | |
832 | | - | |
833 | | - | |
834 | | - | |
| 855 | + | |
| 856 | + | |
835 | 857 | | |
836 | | - | |
837 | | - | |
838 | | - | |
| 858 | + | |
| 859 | + | |
| 860 | + | |
| 861 | + | |
| 862 | + | |
| 863 | + | |
839 | 864 | | |
840 | 865 | | |
841 | 866 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
229 | 229 | | |
230 | 230 | | |
231 | 231 | | |
| 232 | + | |
| 233 | + | |
| 234 | + | |
| 235 | + | |
232 | 236 | | |
233 | 237 | | |
234 | 238 | | |
| |||
241 | 245 | | |
242 | 246 | | |
243 | 247 | | |
| 248 | + | |
| 249 | + | |
| 250 | + | |
| 251 | + | |
| 252 | + | |
| 253 | + | |
| 254 | + | |
| 255 | + | |
244 | 256 | | |
245 | 257 | | |
246 | 258 | | |
| |||
514 | 526 | | |
515 | 527 | | |
516 | 528 | | |
517 | | - | |
| 529 | + | |
518 | 530 | | |
519 | | - | |
| 531 | + | |
| 532 | + | |
520 | 533 | | |
521 | 534 | | |
522 | 535 | | |
523 | | - | |
524 | | - | |
| 536 | + | |
| 537 | + | |
| 538 | + | |
525 | 539 | | |
526 | | - | |
527 | | - | |
528 | 540 | | |
529 | 541 | | |
530 | 542 | | |
| 543 | + | |
| 544 | + | |
| 545 | + | |
| 546 | + | |
| 547 | + | |
| 548 | + | |
| 549 | + | |
| 550 | + | |
| 551 | + | |
| 552 | + | |
| 553 | + | |
| 554 | + | |
| 555 | + | |
| 556 | + | |
| 557 | + | |
| 558 | + | |
531 | 559 | | |
532 | 560 | | |
533 | 561 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
80 | 80 | | |
81 | 81 | | |
82 | 82 | | |
| 83 | + | |
| 84 | + | |
83 | 85 | | |
84 | 86 | | |
85 | 87 | | |
| |||
272 | 274 | | |
273 | 275 | | |
274 | 276 | | |
| 277 | + | |
275 | 278 | | |
276 | 279 | | |
277 | 280 | | |
278 | 281 | | |
279 | 282 | | |
280 | 283 | | |
| 284 | + | |
| 285 | + | |
281 | 286 | | |
282 | 287 | | |
283 | 288 | | |
284 | 289 | | |
285 | 290 | | |
286 | 291 | | |
| 292 | + | |
287 | 293 | | |
288 | 294 | | |
289 | 295 | | |
290 | | - | |
291 | | - | |
292 | | - | |
293 | | - | |
294 | | - | |
295 | | - | |
296 | | - | |
297 | | - | |
298 | | - | |
299 | 296 | | |
300 | 297 | | |
301 | 298 | | |
302 | | - | |
303 | | - | |
304 | 299 | | |
305 | | - | |
| 300 | + | |
306 | 301 | | |
307 | 302 | | |
| 303 | + | |
| 304 | + | |
| 305 | + | |
308 | 306 | | |
309 | 307 | | |
310 | 308 | | |
| |||
316 | 314 | | |
317 | 315 | | |
318 | 316 | | |
319 | | - | |
| 317 | + | |
| 318 | + | |
320 | 319 | | |
321 | 320 | | |
322 | | - | |
323 | | - | |
324 | | - | |
325 | | - | |
| 321 | + | |
| 322 | + | |
| 323 | + | |
| 324 | + | |
| 325 | + | |
| 326 | + | |
| 327 | + | |
326 | 328 | | |
327 | 329 | | |
328 | 330 | | |
| |||
0 commit comments