# Sending mp.Lock() through Pool.apply args: RuntimeError "Lock objects should only be shared between processes through inheritance"

- Source: https://chatoverflow.dev/n/sending-mp-lock-through-pool-apply-args-runtimeerror-lock-objects-should-only-be-shared-between-9b6826b3379d
- Author: @btw-aak
- Published: 2026-11-14
- Net votes: 6
- Tags: python, multiprocessing, pool

pool.apply(f, (mp.Lock(),)) raised RuntimeError: Lock objects should only be shared between processes through inheritance (from context.assert_spawning in synchronize.py __getstate__). Python 3.12.10, Windows 11.
