Commit 324473c
lib: improved diagnostics_channel subscribe/unsubscribe
Adds a new top-level subscribe/unsubscribe which will ref/unref the
channel WeakReference to prevent subscriptions from getting garbage
collected.
PR-URL: #42714
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Chengzhong Wu <legendecas@gmail.com>
Reviewed-By: Gerhard Stöbich <deb2001-github@yahoo.de>
Reviewed-By: Rafael Gonzaga <rafael.nunu@hotmail.com>
Reviewed-By: Vladimir de Turckheim <vlad2t@hotmail.com>1 parent 2ec8092 commit 324473cCopy full SHA for 324473c
File tree
Expand file treeCollapse file tree
3 files changed
+150
-7
lines changedOpen diff view settings
Filter options
- doc/api
- lib
- test/parallel
Expand file treeCollapse file tree
3 files changed
+150
-7
lines changedOpen diff view settings
Collapse file
doc/api/diagnostics_channel.md
Copy file name to clipboardExpand all lines: doc/api/diagnostics_channel.md+88-7Lines changed: 88 additions & 7 deletions
- Display the source diff
- Display the rich diff
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| ||
43 | 43 | |
44 | 44 | |
45 | 45 | |
46 | | - |
47 | | - |
| 46 | + |
48 | 47 | |
49 | | - |
| 48 | + |
| 49 | + |
| 50 | + |
| 51 | + |
50 | 52 | |
51 | 53 | |
52 | 54 | |
| ||
55 | 57 | |
56 | 58 | |
57 | 59 | |
| 60 | + |
| 61 | + |
| 62 | + |
58 | 63 | |
59 | 64 | |
60 | 65 | |
| ||
63 | 68 | |
64 | 69 | |
65 | 70 | |
66 | | - |
67 | | - |
| 71 | + |
68 | 72 | |
69 | | - |
| 73 | + |
| 74 | + |
| 75 | + |
| 76 | + |
70 | 77 | |
71 | 78 | |
72 | 79 | |
| ||
75 | 82 | |
76 | 83 | |
77 | 84 | |
| 85 | + |
| 86 | + |
| 87 | + |
78 | 88 | |
79 | 89 | |
80 | 90 | |
| ||
121 | 131 | |
122 | 132 | |
123 | 133 | |
124 | | - |
| 134 | + |
125 | 135 | |
126 | 136 | |
127 | 137 | |
| ||
137 | 147 | |
138 | 148 | |
139 | 149 | |
| 150 | + |
| 151 | + |
| 152 | + |
| 153 | + |
| 154 | + |
| 155 | + |
| 156 | + |
| 157 | + |
| 158 | + |
| 159 | + |
| 160 | + |
| 161 | + |
| 162 | + |
| 163 | + |
| 164 | + |
| 165 | + |
| 166 | + |
| 167 | + |
| 168 | + |
| 169 | + |
| 170 | + |
| 171 | + |
| 172 | + |
| 173 | + |
| 174 | + |
| 175 | + |
| 176 | + |
| 177 | + |
| 178 | + |
| 179 | + |
| 180 | + |
| 181 | + |
| 182 | + |
| 183 | + |
| 184 | + |
| 185 | + |
| 186 | + |
| 187 | + |
| 188 | + |
| 189 | + |
| 190 | + |
| 191 | + |
| 192 | + |
| 193 | + |
| 194 | + |
| 195 | + |
| 196 | + |
| 197 | + |
| 198 | + |
| 199 | + |
| 200 | + |
| 201 | + |
| 202 | + |
| 203 | + |
| 204 | + |
| 205 | + |
| 206 | + |
| 207 | + |
| 208 | + |
| 209 | + |
| 210 | + |
| 211 | + |
| 212 | + |
| 213 | + |
| 214 | + |
| 215 | + |
| 216 | + |
| 217 | + |
| 218 | + |
| 219 | + |
140 | 220 | |
141 | 221 | |
142 | 222 | |
| ||
344 | 424 | |
345 | 425 | |
346 | 426 | |
| 427 | + |
347 | 428 | |
Collapse file
+18Lines changed: 18 additions & 0 deletions
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| ||
109 | 109 | |
110 | 110 | |
111 | 111 | |
| 112 | + |
| 113 | + |
| 114 | + |
| 115 | + |
| 116 | + |
| 117 | + |
| 118 | + |
| 119 | + |
| 120 | + |
| 121 | + |
| 122 | + |
| 123 | + |
| 124 | + |
| 125 | + |
| 126 | + |
| 127 | + |
112 | 128 | |
113 | 129 | |
114 | 130 | |
| ||
123 | 139 | |
124 | 140 | |
125 | 141 | |
| 142 | + |
| 143 | + |
126 | 144 | |
127 | 145 | |
Collapse file
test/parallel/test-diagnostics-channel-pub-sub.js
Copy file name to clipboard+44Lines changed: 44 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 | + |
| 21 | + |
| 22 | + |
| 23 | + |
| 24 | + |
| 25 | + |
| 26 | + |
| 27 | + |
| 28 | + |
| 29 | + |
| 30 | + |
| 31 | + |
| 32 | + |
| 33 | + |
| 34 | + |
| 35 | + |
| 36 | + |
| 37 | + |
| 38 | + |
| 39 | + |
| 40 | + |
| 41 | + |
| 42 | + |
| 43 | + |
| 44 | + |
0 commit comments