class_docstr: Manager for resources using background thread.
class_docstr_tok: ["Manager","for","resources","using","background","thread","."]
code: def _afterfork(self):
      for key, (send, close) in self._cache.items():
          close()
      self._cache.clear()
      # If self._lock was locked at the time of the fork, it may be broken
      # -- see issue 6721.  Replace it without letting it be gc'ed.
      self._old_locks.append(self._lock)
      self._lock = threading.Lock()
      if self._listener is not None:
          self._listener.close()
      self._listener = None
      self._address = None
      self._thread = None
  
file_path: multiprocess/pypy3.8/multiprocess/resource_sharer.py
imports: import os
  import signal
  import socket
  import sys
  import threading
  from .None import process
  from .context import reduction
  from .None import util
label_desc: Use image node_id 5 for calling the _ResourceSharer obj's underlying member method code with example usage: obj._afterfork() without return types