Concurrency and Process Modules

multiprocessing.sharedctypes

Allocates ctypes values and arrays in memory suitable for sharing with child processes. RawValue and RawArray provide no automatic synchronization; Value and Array can wrap access with locks. Compound operations still need an explicit lock. This example creates only local shared storage.

Formal Syntax & Structure

python syntaxpython
import multiprocessing.sharedctypes

Return Value

module

Module namespace available through import; import is a statement, not a value-returning expression.

Working Example

Example Snippetpython
from multiprocessing.sharedctypes import RawArrayvalues = RawArray("i", [1, 2, 3])values[1] = 9print(list(values))
Python Reference