You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Use new _at_fork_reinit() lock method in multiprocessing #84402
Currently, _ResourceSharer._after_fork() of multiprocessing.resource_sharer creates new locks and leak old locks on purpose. This method can benefit of the newly added _at_fork_reinit() method added by bpo-40089.
Queue._after_fork() could also call self._notempty._at_fork_reinit().
Also: ForkAwareThreadLock could reinitializes its lock.
Activity
vstinner commentedon Apr 7, 2020
Currently, _ResourceSharer._after_fork() of multiprocessing.resource_sharer creates new locks and leak old locks on purpose. This method can benefit of the newly added _at_fork_reinit() method added by bpo-40089.
Queue._after_fork() could also call self._notempty._at_fork_reinit().
Also: ForkAwareThreadLock could reinitializes its lock.
corona10 commentedon Apr 11, 2020
I am going to take a look
corona10 commentedon Apr 11, 2020
we should find all usages from Lib/multiprocessing/*.py
corona10 commentedon Apr 14, 2020
New changeset e194530 by Dong-hee Na in branch 'master':
bpo-40221: Update multiprocessing to use _at_fork_reinit (GH-19477)
e194530
corona10 commentedon Apr 14, 2020
New changeset a5900ec by Dong-hee Na in branch 'master':
bpo-40221: Update multiprocessing to use _at_fork_reinit (GH-19511)
a5900ec
corona10 commentedon Apr 14, 2020
Looks like we update all the methods which are related to _after_fork
under Lib/multiprocessing.
I am now closing this issue.
Thanks for the suggestion, Victor :)