Skip to content

Commit

Permalink
Fixed with weakref, needs to be done in other signals too
Browse files Browse the repository at this point in the history
  • Loading branch information
aabmass committed Oct 10, 2024
1 parent 483024d commit bd9a74d
Showing 1 changed file with 3 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,7 @@
from threading import Event, Lock, RLock, Thread
from time import time_ns
from typing import IO, Callable, Dict, Iterable, Optional
import weakref

from typing_extensions import final

Expand Down Expand Up @@ -490,8 +491,9 @@ def __init__(
)
self._daemon_thread.start()
if hasattr(os, "register_at_fork"):
weakself = weakref.proxy(self)
os.register_at_fork(
after_in_child=self._at_fork_reinit
after_in_child=lambda: weakself._at_fork_reinit()
) # pylint: disable=protected-access
elif self._export_interval_millis <= 0:
raise ValueError(
Expand Down

0 comments on commit bd9a74d

Please sign in to comment.