Commit 87032fa
committed
Add cache generation tracking for main interpreter contexts
flush_imports now works correctly for all context types:
- Subinterpreter pool: slots marked stale and replaced
- OWN_GIL: each has own subinterpreter destroyed with context
- Main interpreter: cache generation checked on module access
Added unconditional import_cache_get_generation() and
import_cache_flush_generation() functions that work regardless
of subinterpreter support.1 parent 07fd494 commit 87032fa
4 files changed
Lines changed: 74 additions & 5 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
4124 | 4124 | | |
4125 | 4125 | | |
4126 | 4126 | | |
| 4127 | + | |
4127 | 4128 | | |
4128 | 4129 | | |
4129 | 4130 | | |
| |||
4236 | 4237 | | |
4237 | 4238 | | |
4238 | 4239 | | |
| 4240 | + | |
4239 | 4241 | | |
4240 | 4242 | | |
4241 | 4243 | | |
| |||
4368 | 4370 | | |
4369 | 4371 | | |
4370 | 4372 | | |
| 4373 | + | |
| 4374 | + | |
| 4375 | + | |
| 4376 | + | |
| 4377 | + | |
| 4378 | + | |
| 4379 | + | |
| 4380 | + | |
| 4381 | + | |
| 4382 | + | |
| 4383 | + | |
| 4384 | + | |
| 4385 | + | |
| 4386 | + | |
| 4387 | + | |
| 4388 | + | |
| 4389 | + | |
| 4390 | + | |
| 4391 | + | |
4371 | 4392 | | |
4372 | 4393 | | |
4373 | 4394 | | |
| |||
5103 | 5124 | | |
5104 | 5125 | | |
5105 | 5126 | | |
5106 | | - | |
5107 | | - | |
| 5127 | + | |
| 5128 | + | |
| 5129 | + | |
| 5130 | + | |
5108 | 5131 | | |
5109 | | - | |
5110 | | - | |
5111 | | - | |
5112 | 5132 | | |
5113 | 5133 | | |
5114 | 5134 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
888 | 888 | | |
889 | 889 | | |
890 | 890 | | |
| 891 | + | |
| 892 | + | |
| 893 | + | |
891 | 894 | | |
892 | 895 | | |
893 | 896 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
540 | 540 | | |
541 | 541 | | |
542 | 542 | | |
| 543 | + | |
| 544 | + | |
| 545 | + | |
| 546 | + | |
| 547 | + | |
| 548 | + | |
543 | 549 | | |
| 550 | + | |
| 551 | + | |
| 552 | + | |
| 553 | + | |
| 554 | + | |
| 555 | + | |
| 556 | + | |
| 557 | + | |
| 558 | + | |
| 559 | + | |
| 560 | + | |
| 561 | + | |
| 562 | + | |
| 563 | + | |
| 564 | + | |
| 565 | + | |
| 566 | + | |
| 567 | + | |
| 568 | + | |
| 569 | + | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
211 | 211 | | |
212 | 212 | | |
213 | 213 | | |
| 214 | + | |
| 215 | + | |
| 216 | + | |
| 217 | + | |
| 218 | + | |
| 219 | + | |
| 220 | + | |
| 221 | + | |
| 222 | + | |
| 223 | + | |
| 224 | + | |
| 225 | + | |
| 226 | + | |
| 227 | + | |
| 228 | + | |
| 229 | + | |
| 230 | + | |
| 231 | + | |
| 232 | + | |
| 233 | + | |
214 | 234 | | |
0 commit comments