Commit ce8536d
committed
Use mutex rather than critical sections.
For TYPE_LOCK, replace critical sections with a simple mutex. A number
of changes were needed to avoid deadlocking on reentrancy (trying to
re-acquire the mutex). Split _PyType_LookupRefAndVersion() into a locked
and unlocked version. Remove atomic operations where they are not
required. Remove some cases of TYPE_LOCK being held that is not
required.1 parent ef2f07b commit ce8536d
3 files changed
Lines changed: 372 additions & 212 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
144 | 144 | | |
145 | 145 | | |
146 | 146 | | |
| 147 | + | |
| 148 | + | |
147 | 149 | | |
148 | 150 | | |
149 | 151 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
576 | 576 | | |
577 | 577 | | |
578 | 578 | | |
579 | | - | |
580 | | - | |
| 579 | + | |
| 580 | + | |
581 | 581 | | |
582 | 582 | | |
583 | 583 | | |
| |||
0 commit comments