Commit 9e8c5c1
fix(AbstractEvent): operator-= holds the event mutex across Delegate:… (#5358)
* fix(AbstractEvent): operator-= holds the event mutex across Delegate::disable #5357
* chore(test): drop redundant lambda captures in CoreTest
CoreTest::testEnvironmentMultiThread captured const int locals
(iterations, numWriters) and an unused id in the reader lambda.
Clang flagged the const captures as not required and the id capture
as unused. Remove them; the lambda bodies still resolve those names
from the enclosing scope without explicit capture.
* fix(Foundation): add detach/detachAll to NotificationStrategy concept #5358
AbstractEvent's lock-order fix calls _strategy.detach() and uses
TStrategy::DelegatePtr, which were not part of the documented
NotificationStrategy interface. Custom downstream strategies would
fail with a confusing per-call-site error instead of an interface
mismatch. Promote detach/detachAll and the DelegatePtr/Delegates
typedefs to NotificationStrategy as pure virtual to make the new
requirement explicit. In-tree strategies (DefaultStrategy,
PriorityStrategy, FIFOStrategy) already implement them.
Also strengthen testRemoveDelegateFromNotify with assertEqual(0,
b.fired()) so the documented behaviour (delegate removed during
notify is not invoked later in the same sequence) is validated
even without TSAN.1 parent 85a9df4 commit 9e8c5c1
7 files changed
Lines changed: 313 additions & 42 deletions
File tree
- Foundation
- include/Poco
- testsuite/src
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
184 | 184 | | |
185 | 185 | | |
186 | 186 | | |
187 | | - | |
188 | | - | |
| 187 | + | |
| 188 | + | |
| 189 | + | |
| 190 | + | |
| 191 | + | |
| 192 | + | |
| 193 | + | |
| 194 | + | |
| 195 | + | |
| 196 | + | |
189 | 197 | | |
190 | 198 | | |
191 | 199 | | |
| |||
206 | 214 | | |
207 | 215 | | |
208 | 216 | | |
209 | | - | |
210 | | - | |
| 217 | + | |
| 218 | + | |
| 219 | + | |
| 220 | + | |
| 221 | + | |
| 222 | + | |
211 | 223 | | |
212 | 224 | | |
213 | 225 | | |
| |||
305 | 317 | | |
306 | 318 | | |
307 | 319 | | |
308 | | - | |
309 | | - | |
| 320 | + | |
| 321 | + | |
| 322 | + | |
| 323 | + | |
| 324 | + | |
| 325 | + | |
| 326 | + | |
| 327 | + | |
| 328 | + | |
| 329 | + | |
| 330 | + | |
310 | 331 | | |
311 | 332 | | |
312 | 333 | | |
| |||
389 | 410 | | |
390 | 411 | | |
391 | 412 | | |
392 | | - | |
393 | | - | |
| 413 | + | |
| 414 | + | |
| 415 | + | |
| 416 | + | |
| 417 | + | |
| 418 | + | |
| 419 | + | |
394 | 420 | | |
395 | 421 | | |
396 | 422 | | |
| |||
411 | 437 | | |
412 | 438 | | |
413 | 439 | | |
414 | | - | |
415 | | - | |
| 440 | + | |
| 441 | + | |
| 442 | + | |
| 443 | + | |
| 444 | + | |
| 445 | + | |
416 | 446 | | |
417 | 447 | | |
418 | 448 | | |
| |||
503 | 533 | | |
504 | 534 | | |
505 | 535 | | |
506 | | - | |
507 | | - | |
| 536 | + | |
| 537 | + | |
| 538 | + | |
| 539 | + | |
| 540 | + | |
| 541 | + | |
| 542 | + | |
| 543 | + | |
| 544 | + | |
| 545 | + | |
| 546 | + | |
508 | 547 | | |
509 | 548 | | |
510 | 549 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
66 | 66 | | |
67 | 67 | | |
68 | 68 | | |
| 69 | + | |
| 70 | + | |
| 71 | + | |
| 72 | + | |
| 73 | + | |
| 74 | + | |
| 75 | + | |
| 76 | + | |
| 77 | + | |
| 78 | + | |
| 79 | + | |
| 80 | + | |
| 81 | + | |
| 82 | + | |
| 83 | + | |
| 84 | + | |
| 85 | + | |
| 86 | + | |
69 | 87 | | |
70 | 88 | | |
71 | 89 | | |
72 | 90 | | |
73 | 91 | | |
74 | | - | |
| 92 | + | |
75 | 93 | | |
76 | | - | |
| 94 | + | |
77 | 95 | | |
78 | 96 | | |
| 97 | + | |
79 | 98 | | |
80 | 99 | | |
81 | | - | |
| 100 | + | |
82 | 101 | | |
83 | 102 | | |
84 | 103 | | |
85 | 104 | | |
86 | 105 | | |
87 | | - | |
| 106 | + | |
88 | 107 | | |
89 | | - | |
| 108 | + | |
90 | 109 | | |
91 | 110 | | |
| 111 | + | |
| 112 | + | |
| 113 | + | |
| 114 | + | |
| 115 | + | |
| 116 | + | |
| 117 | + | |
| 118 | + | |
| 119 | + | |
| 120 | + | |
| 121 | + | |
92 | 122 | | |
93 | 123 | | |
94 | 124 | | |
| |||
102 | 132 | | |
103 | 133 | | |
104 | 134 | | |
105 | | - | |
| 135 | + | |
| 136 | + | |
106 | 137 | | |
107 | 138 | | |
108 | 139 | | |
109 | | - | |
110 | 140 | | |
111 | 141 | | |
112 | 142 | | |
| |||
164 | 194 | | |
165 | 195 | | |
166 | 196 | | |
| 197 | + | |
| 198 | + | |
| 199 | + | |
| 200 | + | |
| 201 | + | |
| 202 | + | |
| 203 | + | |
| 204 | + | |
| 205 | + | |
| 206 | + | |
| 207 | + | |
| 208 | + | |
| 209 | + | |
167 | 210 | | |
168 | 211 | | |
169 | 212 | | |
170 | 213 | | |
171 | 214 | | |
172 | | - | |
| 215 | + | |
173 | 216 | | |
174 | | - | |
| 217 | + | |
175 | 218 | | |
176 | 219 | | |
| 220 | + | |
177 | 221 | | |
178 | 222 | | |
179 | | - | |
| 223 | + | |
180 | 224 | | |
181 | 225 | | |
182 | 226 | | |
183 | 227 | | |
184 | 228 | | |
185 | | - | |
| 229 | + | |
186 | 230 | | |
187 | | - | |
| 231 | + | |
188 | 232 | | |
189 | 233 | | |
| 234 | + | |
| 235 | + | |
| 236 | + | |
| 237 | + | |
| 238 | + | |
| 239 | + | |
| 240 | + | |
| 241 | + | |
190 | 242 | | |
191 | 243 | | |
192 | 244 | | |
| |||
209 | 261 | | |
210 | 262 | | |
211 | 263 | | |
212 | | - | |
| 264 | + | |
| 265 | + | |
213 | 266 | | |
214 | 267 | | |
215 | 268 | | |
216 | | - | |
217 | 269 | | |
218 | 270 | | |
219 | 271 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
19 | 19 | | |
20 | 20 | | |
21 | 21 | | |
| 22 | + | |
| 23 | + | |
22 | 24 | | |
23 | 25 | | |
24 | 26 | | |
| |||
34 | 36 | | |
35 | 37 | | |
36 | 38 | | |
| 39 | + | |
| 40 | + | |
37 | 41 | | |
38 | 42 | | |
39 | 43 | | |
| |||
53 | 57 | | |
54 | 58 | | |
55 | 59 | | |
| 60 | + | |
| 61 | + | |
| 62 | + | |
| 63 | + | |
| 64 | + | |
| 65 | + | |
| 66 | + | |
| 67 | + | |
| 68 | + | |
| 69 | + | |
| 70 | + | |
| 71 | + | |
| 72 | + | |
| 73 | + | |
| 74 | + | |
| 75 | + | |
| 76 | + | |
56 | 77 | | |
57 | 78 | | |
58 | 79 | | |
| |||
71 | 92 | | |
72 | 93 | | |
73 | 94 | | |
| 95 | + | |
| 96 | + | |
74 | 97 | | |
75 | 98 | | |
76 | 99 | | |
| |||
90 | 113 | | |
91 | 114 | | |
92 | 115 | | |
| 116 | + | |
| 117 | + | |
| 118 | + | |
| 119 | + | |
| 120 | + | |
| 121 | + | |
| 122 | + | |
| 123 | + | |
| 124 | + | |
93 | 125 | | |
94 | 126 | | |
95 | 127 | | |
| |||
0 commit comments