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 a Synchronizer object.

match(label: object) object[source]
permits(label: object) int[source]
requests(label: object) int[source]
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 with module_name. If module_name is __main__ then the manager will be started in the given address with the given authkey. If module_name is not __main__ then the manager will be connected to the given address with the given authkey.

If ensure_clean is True, a RuntimeError will be raised if address is None. If ensure_clean is False and warn is True a RuntimeWarning will be emitted instead. If ensure_clean is False and warn is False no error or warning will be emitted. If warn is True and authkey is None, a RuntimeWarning will be emitted.