Source code
Revision control
Copy as Markdown
Other Tools
# mypy: allow-untyped-defs
import multiprocessing
_context = None
def get_context():
global _context
if _context is None:
_context = multiprocessing.get_context("spawn")
return _context