Inzynierka/Lib/site-packages/joblib/externals/loky/backend/__init__.py
2023-06-02 12:51:02 +02:00

15 lines
312 B
Python

import os
from multiprocessing import synchronize
from .context import get_context
def _make_name():
return f'/loky-{os.getpid()}-{next(synchronize.SemLock._rand)}'
# monkey patch the name creation for multiprocessing
synchronize.SemLock._make_name = staticmethod(_make_name)
__all__ = ["get_context"]