multiprocessing.freeze_support
Prev: multiprocessing.Event | Up: multiprocessing | Next: multiprocessing.get_all_start_methods
Rel: multiprocessing.active_children, multiprocessing.allow_connection_pickling, multiprocessing.Array, multiprocessing.AuthenticationError
Ref: docs.python.org — multiprocessing.freeze_support
Tags: #public #python3 #stdlib #multiprocessing
Import
import multiprocessing
from multiprocessing import freeze_support
Signature & Overview
multiprocessing.freeze_support()
Check whether this is a fake forked process in a frozen executable.
Usage
import multiprocessing as mp
# Required inside `if __name__ == "__main__":` for frozen Windows executables (PyInstaller/cx_Freeze)
mp.freeze_support()
Gotchas
- No-op on non-frozen scripts: Safe to include at the top of
if __name__ == "__main__":in cross-platform apps.
REPL Inspect
from multiprocessing import freeze_support
help(freeze_support)
Linked from
Related notes
- tuts/python3/stdlib_module/multiprocessing/Event Linked here; links to this page; shared tags: #multiprocessing, #stdlib
- tuts/python3/stdlib_module/multiprocessing/get_all_start_methods Linked here; links to this page; shared tags: #multiprocessing, #stdlib
- tuts/python3/stdlib_module/multiprocessing Linked here; links to this page; shared tags: #stdlib
- tuts/python3/stdlib_module/multiprocessing/active_children Linked here; shared tags: #multiprocessing, #stdlib
- tuts/python3/stdlib_module/multiprocessing/allow_connection_pickling Linked here; shared tags: #multiprocessing, #stdlib
- tuts/python3/stdlib_module/multiprocessing/Array Linked here; shared tags: #multiprocessing, #stdlib
- tuts/python3/stdlib_module/multiprocessing/AuthenticationError Linked here; shared tags: #multiprocessing, #stdlib
- tuts/python3/stdlib_module/multiprocessing/Barrier shared tags: #multiprocessing, #stdlib
- tuts/python3/stdlib_module/multiprocessing/BoundedSemaphore shared tags: #multiprocessing, #stdlib
- tuts/python3/stdlib_module/multiprocessing/BufferTooShort shared tags: #multiprocessing, #stdlib