multiprocessing.Process.sentinel

sentinel A numeric handle of a system object which will become “ready” when the process ends. You can use this value if you want to wait on several events at once using multiprocessing.connection.wait(). Otherwise calling join() is simpler. On Windows, this is an OS handle usable with the WaitForSingleObject and WaitForMultipleObjects family of API calls. On Unix, this is a file descriptor usable with primitives from the select module. New in version 3.3.

multiprocessing.Process.run()

run() Method representing the process’s activity. You may override this method in a subclass. The standard run() method invokes the callable object passed to the object’s constructor as the target argument, if any, with sequential and keyword arguments taken from the args and kwargs arguments, respectively.

multiprocessing.Process.pid

pid Return the process ID. Before the process is spawned, this will be None.

multiprocessing.Process.name

name The process’s name. The name is a string used for identification purposes only. It has no semantics. Multiple processes may be given the same name. The initial name is set by the constructor. If no explicit name is provided to the constructor, a name of the form ‘Process-N1:N2:...:Nk‘ is constructed, where each Nk is the N-th child of its parent.

multiprocessing.Process.join()

join([timeout]) If the optional argument timeout is None (the default), the method blocks until the process whose join() method is called terminates. If timeout is a positive number, it blocks at most timeout seconds. A process can be joined many times. A process cannot join itself because this would cause a deadlock. It is an error to attempt to join a process before it has been started.

multiprocessing.Process.is_alive()

is_alive() Return whether the process is alive. Roughly, a process object is alive from the moment the start() method returns until the child process terminates.

multiprocessing.Process.exitcode

exitcode The child’s exit code. This will be None if the process has not yet terminated. A negative value -N indicates that the child was terminated by signal N.

multiprocessing.Process.daemon

daemon The process’s daemon flag, a Boolean value. This must be set before start() is called. The initial value is inherited from the creating process. When a process exits, it attempts to terminate all of its daemonic child processes. Note that a daemonic process is not allowed to create child processes. Otherwise a daemonic process would leave its children orphaned if it gets terminated when its parent process exits. Additionally, these are not Unix daemons or services, they are normal pro

multiprocessing.Process.authkey

authkey The process’s authentication key (a byte string). When multiprocessing is initialized the main process is assigned a random string using os.urandom(). When a Process object is created, it will inherit the authentication key of its parent process, although this may be changed by setting authkey to another byte string. See Authentication keys.

multiprocessing.Process

class multiprocessing.Process(group=None, target=None, name=None, args=(), kwargs={}, *, daemon=None) Process objects represent activity that is run in a separate process. The Process class has equivalents of all the methods of threading.Thread. The constructor should always be called with keyword arguments. group should always be None; it exists solely for compatibility with threading.Thread. target is the callable object to be invoked by the run() method. It defaults to None, meaning nothi