New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Multiprocessing.Manager: fix behavior and doc inconsistencies #67886
Comments
multiprocessing.Manager seems to have an inconsistency in behaviour/documentation or both. The behaviour inconsistency is documented in the attached test script which should run for both Python2 and Python3. Briefly, multiprocessing.managers.BaseManager class starts a Python subprocess only after a call to its "start" method. Whereas its subclass, multiprocessing.managers.SyncManager does at the time of object creation. This is undocumented and against the base classe's documented behaviour. Also, the SyncManager is more commonly advertised via the facade multiprocessing.Manager() which is again at odds with the BaseManager's interface in that,
Please find the attached file for all the sequence of tests done. Suggested changes are,
|
This is closely related to bpo-23510. The two issues are reacting to the same underlying inconsistency though in this issue the problem is more generally (and clearly) stated whereas bpo-23510 is more concerned with the consequences to using these as Context Managers. The solution that gets implemented here should address both issues. As mentioned in bpo-23510, I have a working fix though am looking for ways to further minimize the impact to existing code that uses Manager/SyncManager -- simply documenting the current inconsistent state is inadequate. |
Is your patch uploaded anywhere ? Anyway, before thinking whether this should be a patch or doc fix, one needs multiprocessing module author to possibly comment on the right behaviour expected here. |
No, it's premature to share the start of my patch. Very much agreed on getting that input/insight -- sbt (multiprocessing module maintainer and original author) was added to the nosy list yesterday too. |
@sbt - Any comments on this ? |
Note: these values reflect the state of the issue at the time it was migrated and might not reflect the current state.
Show more details
GitHub fields:
bugs.python.org fields:
The text was updated successfully, but these errors were encountered: