chore: simplify periodic thread implementation#19142
Conversation
We simplify the implementation of native periodic threads by removing unnecessary defensive coding. The changes in #18921 provided the minimal fix required to fix a fork-related hang, with the defensive coding in
Codeowners resolved as |
Circular import analysis
|
BenchmarksBenchmark execution time: 2026-07-17 15:53:04 Comparing candidate commit ba3350b in PR branch Found 0 performance improvements and 5 performance regressions! Performance is the same for 612 metrics, 10 unstable metrics. scenario:iastaspects-lstrip_aspect
scenario:iastaspects-swapcase_aspect
scenario:iastaspectsospath-ospathbasename_aspect
scenario:span-start
scenario:telemetryaddmetric-1-count-metric-1-times
|
|
|
|
||
| // Remove the thread from the mapping of active threads. | ||
| unregister_periodic_thread_if_self(state->periodic_threads, self->ident, (PyObject*)self); | ||
| PyDict_DelItem(state->periodic_threads, self->ident); |
There was a problem hiding this comment.
this is still the same bug as before, no?
or the issue was one of the "remove from periodic thread" calls below that was deleted?
Description
We simplify the implementation of native periodic threads by removing unnecessary defensive coding. The changes in #18921 provided the minimal fix required to fix a fork-related hang, with the defensive coding in #18636 and #18920 thus becoming redundant.