Debian Codegraph @

loky/backend/__init__.py

raw
1 import os
2 from multiprocessing import synchronize
3
4 from .context import get_context
5
6
7 def _make_name():
8 return f"/loky-{os.getpid()}-{next(synchronize.SemLock._rand)}"
9
10
11 # monkey patch the name creation for multiprocessing
12 synchronize.SemLock._make_name = staticmethod(_make_name)
13
14 __all__ = ["get_context"]