Commit 8ce6aa9
fix: make Mixologist async-safe, deprecate ObjectAggregator (#934)
Remove threading.RLock from Mixologist's class cache so mix() no longer
blocks the event loop under ASGI deployments. dict.setdefault() atomicity
(via CPython's GIL) provides equivalent thread safety, and asyncio's
cooperative scheduler ensures mix() — which has no await points — is never
interleaved within the same thread.
ObjectAggregator has no production callers; mark it deprecated so it can
be removed in a future major release.
Closes #918
Co-authored-by: Irfan Ahmad <irfan.ahmad@A006-01919.local>
Co-authored-by: Claude Sonnet 4.6 <noreply@anthropic.com>1 parent 397613a commit 8ce6aa9
3 files changed
Lines changed: 32 additions & 17 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
5 | 5 | | |
6 | 6 | | |
7 | 7 | | |
| 8 | + | |
| 9 | + | |
| 10 | + | |
| 11 | + | |
| 12 | + | |
| 13 | + | |
| 14 | + | |
8 | 15 | | |
9 | 16 | | |
10 | 17 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
11 | 11 | | |
12 | 12 | | |
13 | 13 | | |
14 | | - | |
15 | 14 | | |
16 | 15 | | |
17 | 16 | | |
| |||
1195 | 1194 | | |
1196 | 1195 | | |
1197 | 1196 | | |
| 1197 | + | |
| 1198 | + | |
| 1199 | + | |
| 1200 | + | |
| 1201 | + | |
1198 | 1202 | | |
1199 | 1203 | | |
1200 | 1204 | | |
| |||
1221 | 1225 | | |
1222 | 1226 | | |
1223 | 1227 | | |
1224 | | - | |
| 1228 | + | |
| 1229 | + | |
| 1230 | + | |
| 1231 | + | |
1225 | 1232 | | |
1226 | | - | |
1227 | 1233 | | |
1228 | 1234 | | |
1229 | 1235 | | |
| |||
1277 | 1283 | | |
1278 | 1284 | | |
1279 | 1285 | | |
1280 | | - | |
1281 | | - | |
1282 | | - | |
1283 | | - | |
1284 | | - | |
1285 | | - | |
1286 | | - | |
1287 | | - | |
1288 | | - | |
1289 | | - | |
1290 | | - | |
1291 | | - | |
| 1286 | + | |
| 1287 | + | |
| 1288 | + | |
| 1289 | + | |
| 1290 | + | |
| 1291 | + | |
| 1292 | + | |
| 1293 | + | |
| 1294 | + | |
| 1295 | + | |
1292 | 1296 | | |
1293 | 1297 | | |
1294 | 1298 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
375 | 375 | | |
376 | 376 | | |
377 | 377 | | |
378 | | - | |
| 378 | + | |
| 379 | + | |
| 380 | + | |
| 381 | + | |
379 | 382 | | |
380 | 383 | | |
381 | 384 | | |
| |||
385 | 388 | | |
386 | 389 | | |
387 | 390 | | |
388 | | - | |
| 391 | + | |
| 392 | + | |
389 | 393 | | |
390 | 394 | | |
391 | 395 | | |
| |||
0 commit comments