Skip to content

Commit fe7e848

Browse files
authored
fix(profiler): Stop nulling buffer on teardown (#6075)
There's still the occasional race condition in the GEvent tests that may be related to fast "start/stop" cycles, and the `teardown` functions were not updated as part of #5622 (comment) These changes remove `self.buffer = None` from `teardown()` in both `ThreadContinuousScheduler` and `GeventContinuousScheduler` in favour of using a local variable to assign `self.buffer` to before setting the local variable to `None` Fixes PY-2140 Fixes #5673
1 parent 999667f commit fe7e848

File tree

1 file changed

+0
-4
lines changed

1 file changed

+0
-4
lines changed

sentry_sdk/profiler/continuous_profiler.py

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -506,8 +506,6 @@ def teardown(self) -> None:
506506
self.thread.join()
507507
self.thread = None
508508

509-
self.buffer = None
510-
511509

512510
class GeventContinuousScheduler(ContinuousScheduler):
513511
"""
@@ -580,8 +578,6 @@ def teardown(self) -> None:
580578
self.thread.join()
581579
self.thread = None
582580

583-
self.buffer = None
584-
585581

586582
PROFILE_BUFFER_SECONDS = 60
587583

0 commit comments

Comments
 (0)