Debian Codegraph @

lib/ansible/utils/multiprocessing.py

raw
1 # Copyright (c) 2019 Matt Martz <[email protected]>
2 # GNU General Public License v3.0+ (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt)
3
4 from __future__ import annotations
5
6 import multiprocessing
7
8 # Explicit multiprocessing context using the fork start method
9 # This exists as a compat layer now that Python3.8 has changed the default
10 # start method for macOS to ``spawn`` which is incompatible with our
11 # code base currently
12 #
13 # This exists in utils to allow it to be easily imported into various places
14 # without causing circular import or dependency problems
15 context = multiprocessing.get_context('fork')