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
implement initializer for multiprocessing.BaseManager.start() #49835
It would be useful to have the ability to run arbitrary code before a
manager's server subprocess is started (I'd use this feature to install
signal handlers for example).
AFAIK there is no equivalent to the managers api in threading.
As for the tests, what kind of tests would you like to see? Jesse, some
thoughts on that?
By the way, in case it isn't clear, I defer to Jesse on whether or not
it makes sense to accept this :)
jnoller commented on Mar 29, 2009
jnollermannequin
Mannequin
More actions
I know, but tests (like the ones you outlined) would also make it more
compelling
lekma commented on Mar 30, 2009
lekmamannequin
MannequinAuthor
More actions
Right, it's just the Thread/Process API equivalance. I'm not saying
it's a stopper, but the docs would probably need to be modified
accordingly.
I'm a bit confused here. The patch only adds a small feature to
BaseManager and subtypes (the same way Pool does it already). AFAICT the
Thread/Process API equivalence is preserved. Am I missing something?
This patch should be better:
checks that initializer is a callable, raise TypeError if not (do it
for Pool.__init__ also).
adds tests for Pool.__init__ and SyncManager.start
lekma commented on Mar 31, 2009
lekmamannequin
MannequinAuthor
More actions
The same against py3k.
Jesse, is there any chance that this will make it in, or should I just
go and implement a local solution?
Jesse, is there any chance that this will make it in, or should I just
go and implement a local solution?
I'm thinking about it and plan on discussing it with other core devs
today. Altering the Api is not something done lightly
lekma commented on Mar 31, 2009
lekmamannequin
MannequinAuthor
More actions
I'm thinking about it and plan on discussing it with other core devs
today. Altering the Api is not something done lightly
yep.
Thanks for considering it.
I'm a bit confused here. The patch only adds a small feature to
BaseManager and subtypes (the same way Pool does it already). AFAICT the
Thread/Process API equivalence is preserved. Am I missing something?
No, I'm the one who was missing something. I obviously didn't look at
the patch carefully enough.
jnoller commented on Apr 2, 2009
jnollermannequin
Mannequin
More actions
committed in r71041 on python trunk, provided clean buildbots, we will
merge to python 3.1
Activity
lekma commentedon Mar 28, 2009
It would be useful to have the ability to run arbitrary code before a
manager's server subprocess is started (I'd use this feature to install
signal handlers for example).
lekma commentedon Mar 28, 2009
here is a patch doing just that (against trunk).
ps: this is my first bug report and contribution to Python, please, be
gentle :)
bitdancer commentedon Mar 28, 2009
Note that the Multiprocessing docs say that the Process "follows the API
of threading.Thread," and this would represent a (minor) divergence.
I also note that the patch does not contain any tests.
lekma commentedon Mar 29, 2009
AFAIK there is no equivalent to the managers api in threading.
As for the tests, what kind of tests would you like to see? Jesse, some
thoughts on that?
bitdancer commentedon Mar 29, 2009
Right, it's just the Thread/Process API equivalance. I'm not saying
it's a stopper, but the docs would probably need to be modified accordingly.
As for tests, even just one that would prove that the method will be
called and do something trivial would be a good thing to have, IMO.
bitdancer commentedon Mar 29, 2009
By the way, in case it isn't clear, I defer to Jesse on whether or not
it makes sense to accept this :)
jnoller commentedon Mar 29, 2009
I know, but tests (like the ones you outlined) would also make it more
compelling
lekma commentedon Mar 30, 2009
This patch should be better:
for Pool.__init__ also).
lekma commentedon Mar 31, 2009
The same against py3k.
Jesse, is there any chance that this will make it in, or should I just
go and implement a local solution?
jnoller commentedon Mar 31, 2009
On Mar 31, 2009, at 2:12 AM, lekma <report@bugs.python.org> wrote:
I'm thinking about it and plan on discussing it with other core devs
today. Altering the Api is not something done lightly
lekma commentedon Mar 31, 2009
bitdancer commentedon Mar 31, 2009
No, I'm the one who was missing something. I obviously didn't look at
the patch carefully enough.
jnoller commentedon Apr 2, 2009
committed in r71041 on python trunk, provided clean buildbots, we will
merge to python 3.1
lekma commentedon Apr 2, 2009
thanks guys