multiprocessing.parent_process
Prev: multiprocessing.Manager | Up: multiprocessing | Next: multiprocessing.Pipe
Rel: multiprocessing.active_children, multiprocessing.allow_connection_pickling, multiprocessing.Array, multiprocessing.AuthenticationError
Ref: docs.python.org — multiprocessing.parent_process
Tags: #public #python3 #stdlib #multiprocessing
Import
import multiprocessing
from multiprocessing import parent_process
Signature & Overview
multiprocessing.parent_process()
Return process object representing the parent process
Usage
import multiprocessing as mp
assert mp.parent_process() is None # None in the main process
Gotchas
- Returns
Nonein the main process: Inside a spawned child process, returns aProcessobject representing the parent.
REPL Inspect
from multiprocessing import parent_process
help(parent_process)
Linked from
Related notes
- tuts/python3/stdlib_module/multiprocessing/Manager Linked here; links to this page; shared tags: #multiprocessing, #stdlib
- tuts/python3/stdlib_module/multiprocessing/Pipe 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