Message125606
The multiprocessing.manager.BaseManager class has a class property called _Server, defaulting to multiprocessing.manager.Server, that is used in the ._run_server method (typically invoked via .run()) to determine the class of the server that is to be created.
On the other hand, the .get_server() method creates an instance of Server independent of what is configured in ._Server. Thus, managers started via .run() behave slightly different than those started with .get_server().serve_forever(), and in a way that is hard to track.
I am aware that the ._Server property is undocumented, but it's quite useful when extending BaseManager in a way that it needs to be configured by the server.
I suggest to have .get_server() use ._Server instead of Server; I can't think of situations in which this does the wrong thing (rather, I assume that up to now, users of ._Server didn't try running with .get_server().serve_forever(); it seems ._Server is not used in the standard library). |
|
Date |
User |
Action |
Args |
2011-01-07 00:32:54 | chrysn | set | recipients:
+ chrysn |
2011-01-07 00:32:54 | chrysn | set | messageid: <1294360374.53.0.588595674921.issue10850@psf.upfronthosting.co.za> |
2011-01-07 00:32:52 | chrysn | link | issue10850 messages |
2011-01-07 00:32:52 | chrysn | create | |
|