Clear recorder startup tasks from memory after processing (#90240)

Co-authored-by: Paulus Schoutsen <balloob@gmail.com>
This commit is contained in:
J. Nick Koston 2023-03-24 10:24:02 -10:00 committed by GitHub
parent 8e07b71644
commit e17cefd61c
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -779,6 +779,10 @@ class Recorder(threading.Thread):
for task in startup_tasks:
self._guarded_process_one_task_or_recover(task)
# Clear startup tasks since this thread runs forever
# and we don't want to hold them in memory
del startup_tasks
self.stop_requested = False
while not self.stop_requested:
self._guarded_process_one_task_or_recover(queue_.get())