multiprocessing.managers.BaseManager.register()

register(typeid[, callable[, proxytype[, exposed[, method_to_typeid[, create_method]]]]]) A classmethod which can be used for registering a type or callable with the manager class. typeid is a “type identifier” which is used to identify a particular type of shared object. This must be a string. callable is a callable used for creating objects for this type identifier. If a manager instance will be connected to the server using the connect() method, or if the create_method argument is False t

multiprocessing.managers.BaseManager.get_server()

get_server() Returns a Server object which represents the actual server under the control of the Manager. The Server object supports the serve_forever() method: >>> from multiprocessing.managers import BaseManager >>> manager = BaseManager(address=('', 50000), authkey=b'abc') >>> server = manager.get_server() >>> server.serve_forever() Server additionally has an address attribute.

multiprocessing.managers.BaseManager.connect()

connect() Connect a local manager object to a remote manager process: >>> from multiprocessing.managers import BaseManager >>> m = BaseManager(address=('127.0.0.1', 5000), authkey=b'abc') >>> m.connect()

multiprocessing.managers.BaseManager.address

address The address used by the manager.

multiprocessing.managers.BaseManager

class multiprocessing.managers.BaseManager([address[, authkey]]) Create a BaseManager object. Once created one should call start() or get_server().serve_forever() to ensure that the manager object refers to a started manager process. address is the address on which the manager process listens for new connections. If address is None then an arbitrary one is chosen. authkey is the authentication key which will be used to check the validity of incoming connections to the server process. If auth

multiprocessing.log_to_stderr()

multiprocessing.log_to_stderr() This function performs a call to get_logger() but in addition to returning the logger created by get_logger, it adds a handler which sends output to sys.stderr using format '[%(levelname)s/%(processName)s] %(message)s'.

multiprocessing.Lock.release()

release() Release a lock. This can be called from any process or thread, not only the process or thread which originally acquired the lock. Behavior is the same as in threading.Lock.release() except that when invoked on an unlocked lock, a ValueError is raised.

multiprocessing.Lock.acquire()

acquire(block=True, timeout=None) Acquire a lock, blocking or non-blocking. With the block argument set to True (the default), the method call will block until the lock is in an unlocked state, then set it to locked and return True. Note that the name of this first argument differs from that in threading.Lock.acquire(). With the block argument set to False, the method call does not block. If the lock is currently in a locked state, return False; otherwise set the lock to a locked state and r

multiprocessing.Lock

class multiprocessing.Lock A non-recursive lock object: a close analog of threading.Lock. Once a process or thread has acquired a lock, subsequent attempts to acquire it from any process or thread will block until it is released; any process or thread may release it. The concepts and behaviors of threading.Lock as it applies to threads are replicated here in multiprocessing.Lock as it applies to either processes or threads, except as noted. Note that Lock is actually a factory function which

multiprocessing.JoinableQueue.task_done()

task_done() Indicate that a formerly enqueued task is complete. Used by queue consumers. For each get() used to fetch a task, a subsequent call to task_done() tells the queue that the processing on the task is complete. If a join() is currently blocking, it will resume when all items have been processed (meaning that a task_done() call was received for every item that had been put() into the queue). Raises a ValueError if called more times than there were items placed in the queue.