pathex.managing.processes module
- class SynchronizerProxy(token, serializer, manager=None, authkey=None, exposed=None, incref=True, manager_owned=False)[source]
Bases:
multiprocessing.managers.BaseProxy
,pathex.managing.mixins.ManagerMixin
,pathex.managing.mixins.LogbookMixin
This class represents is a
proxy
to aSynchronizer
object.
- get_mp_process_manager(module_name: Optional[str], address: Optional[tuple[str, int]] = None, authkey=None, manager_class: type[~_T] = <class 'multiprocessing.managers.SyncManager'>, ensure_clean_call=False, warn=False)[source]
Returns a
manager_class
according withmodule_name
. Ifmodule_name
is__main__
then the manager will bestarted
in the given address with the given authkey. Ifmodule_name
is not__main__
then the manager will beconnected
to the givenaddress
with the givenauthkey
.If
ensure_clean
isTrue
, aRuntimeError
will be raised ifaddress
isNone
. Ifensure_clean
isFalse
andwarn
isTrue
aRuntimeWarning
will be emitted instead. Ifensure_clean
isFalse
andwarn
isFalse
no error or warning will be emitted. Ifwarn
isTrue
andauthkey
isNone
, aRuntimeWarning
will be emitted.