Issue 28736: multiprocessing.Lock() no longer has .acquire() (original) (raw)

Issue28736

Created on 2016-11-18 16:32 by Eric Leadbetter, last changed 2022-04-11 14:58 by admin. This issue is now closed.

Messages (3)
msg281141 - (view) Author: Eric Leadbetter (Eric Leadbetter) Date: 2016-11-18 16:32
The documentation on the multiprocessing library in Python 3 uses Lock.acquire()/Lock.release() in the example for primitive synchronization (https://docs.python.org/3/library/multiprocessing.html#synchronization-between-processes). Lock() has been changed in Python 3 to use coroutines and so the documentation should replace the call to Lock.acquire() with an appropriate yield statement.
msg281152 - (view) Author: R. David Murray (r.david.murray) * (Python committer) Date: 2016-11-18 17:45
What gives you the idea that the multiprocessing Lock implementation has been changed? Are you confusing the asyncio Lock with the threading Lock? Is there a documentation crosslink somewhere that is going to the wrong place?
msg281157 - (view) Author: Eric Leadbetter (Eric Leadbetter) Date: 2016-11-18 18:45
It was a typographical error on my part. My mistake.
History
Date User Action Args
2022-04-11 14:58:39 admin set github: 72922
2016-11-18 19:03:42 zach.ware set resolution: not a bugstage: resolved
2016-11-18 18:45:18 Eric Leadbetter set status: open -> closedmessages: +
2016-11-18 17:45:26 r.david.murray set nosy: + r.david.murraymessages: +
2016-11-18 16:32:34 Eric Leadbetter create