Markdown Format | JSON API | MCP Server Tool
Help on package multiprocessing: NAME multiprocessing MODULE REFERENCE https://docs.python.org/3.10/library/multiprocessing.html The following documentation is automatically generated from the Python source files. It may be incomplete, incorrect or include features that are considered implementation detail and may vary between Python implementations. When in doubt, consult the module reference at the location listed above. DESCRIPTION # Package analogous to 'threading.py' but using processes # # multiprocessing/__init__.py # # This package is intended to duplicate the functionality (and much of # the API) of threading.py but uses processes instead of threads. A # subpackage 'multiprocessing.dummy' has the same API but is a simple # wrapper for 'threading'. # # Copyright (c) 2006-2008, R Oudkerk # Licensed to PSF under a Contributor Agreement. # PACKAGE CONTENTS connection context dummy (package) forkserver heap managers pool popen_fork popen_forkserver popen_spawn_posix popen_spawn_win32 process queues reduction resource_sharer resource_tracker shared_memory sharedctypes spawn synchronize util SUBMODULES reducer CLASSES builtins.Exception(builtins.BaseException) multiprocessing.context.ProcessError multiprocessing.context.AuthenticationError multiprocessing.context.BufferTooShort multiprocessing.context.TimeoutError multiprocessing.process.BaseProcess(builtins.object) multiprocessing.context.Process class AuthenticationError(ProcessError) | Method resolution order: | AuthenticationError | ProcessError | builtins.Exception | builtins.BaseException | builtins.object | | Data descriptors inherited from ProcessError: | | __weakref__ | list of weak references to the object (if defined) | | ---------------------------------------------------------------------- | Methods inherited from builtins.Exception: | | __init__(self, /, *args, **kwargs) | Initialize self. See help(type(self)) for accurate signature. | | ---------------------------------------------------------------------- | Static methods inherited from builtins.Exception: | | __new__(*args, **kwargs) from builtins.type | Create and return a new object. See help(type) for accurate signature. | | ---------------------------------------------------------------------- | Methods inherited from builtins.BaseException: | | __delattr__(self, name, /) | Implement delattr(self, name). | | __getattribute__(self, name, /) | Return getattr(self, name). | | __reduce__(...) | Helper for pickle. | | __repr__(self, /) | Return repr(self). | | __setattr__(self, name, value, /) | Implement setattr(self, name, value). | | __setstate__(...) | | __str__(self, /) | Return str(self). | | with_traceback(...) | Exception.with_traceback(tb) -- | set self.__traceback__ to tb and return self. | | ---------------------------------------------------------------------- | Data descriptors inherited from builtins.BaseException: | | __cause__ | exception cause | | __context__ | exception context | | __dict__ | | __suppress_context__ | | __traceback__ | | args class BufferTooShort(ProcessError) | Method resolution order: | BufferTooShort | ProcessError | builtins.Exception | builtins.BaseException | builtins.object | | Data descriptors inherited from ProcessError: | | __weakref__ | list of weak references to the object (if defined) | | ---------------------------------------------------------------------- | Methods inherited from builtins.Exception: | | __init__(self, /, *args, **kwargs) | Initialize self. See help(type(self)) for accurate signature. | | ---------------------------------------------------------------------- | Static methods inherited from builtins.Exception: | | __new__(*args, **kwargs) from builtins.type | Create and return a new object. See help(type) for accurate signature. | | ---------------------------------------------------------------------- | Methods inherited from builtins.BaseException: | | __delattr__(self, name, /) | Implement delattr(self, name). | | __getattribute__(self, name, /) | Return getattr(self, name). | | __reduce__(...) | Helper for pickle. | | __repr__(self, /) | Return repr(self). | | __setattr__(self, name, value, /) | Implement setattr(self, name, value). | | __setstate__(...) | | __str__(self, /) | Return str(self). | | with_traceback(...) | Exception.with_traceback(tb) -- | set self.__traceback__ to tb and return self. | | ---------------------------------------------------------------------- | Data descriptors inherited from builtins.BaseException: | | __cause__ | exception cause | | __context__ | exception context | | __dict__ | | __suppress_context__ | | __traceback__ | | args class Process(multiprocessing.process.BaseProcess) | Process(group=None, target=None, name=None, args=(), kwargs={}, *, daemon=None) | | Method resolution order: | Process | multiprocessing.process.BaseProcess | builtins.object | | Methods inherited from multiprocessing.process.BaseProcess: | | __init__(self, group=None, target=None, name=None, args=(), kwargs={}, *, daemon=None) | Initialize self. See help(type(self)) for accurate signature. | | __repr__(self) | Return repr(self). | | close(self) | Close the Process object. | | This method releases resources held by the Process object. It is | an error to call this method if the child process is still running. | | is_alive(self) | Return whether process is alive | | join(self, timeout=None) | Wait until child process terminates | | kill(self) | Terminate process; sends SIGKILL signal or uses TerminateProcess() | | run(self) | Method to be run in sub-process; can be overridden in sub-class | | start(self) | Start child process | | terminate(self) | Terminate process; sends SIGTERM signal or uses TerminateProcess() | | ---------------------------------------------------------------------- | Readonly properties inherited from multiprocessing.process.BaseProcess: | | exitcode | Return exit code of process or `None` if it has yet to stop | | ident | Return identifier (PID) of process or `None` if it has yet to start | | pid | Return identifier (PID) of process or `None` if it has yet to start | | sentinel | Return a file descriptor (Unix) or handle (Windows) suitable for | waiting for process termination. | | ---------------------------------------------------------------------- | Data descriptors inherited from multiprocessing.process.BaseProcess: | | __dict__ | dictionary for instance variables (if defined) | | __weakref__ | list of weak references to the object (if defined) | | authkey | | daemon | Return whether process is a daemon | | name class ProcessError(builtins.Exception) | Method resolution order: | ProcessError | builtins.Exception | builtins.BaseException | builtins.object | | Data descriptors defined here: | | __weakref__ | list of weak references to the object (if defined) | | ---------------------------------------------------------------------- | Methods inherited from builtins.Exception: | | __init__(self, /, *args, **kwargs) | Initialize self. See help(type(self)) for accurate signature. | | ---------------------------------------------------------------------- | Static methods inherited from builtins.Exception: | | __new__(*args, **kwargs) from builtins.type | Create and return a new object. See help(type) for accurate signature. | | ---------------------------------------------------------------------- | Methods inherited from builtins.BaseException: | | __delattr__(self, name, /) | Implement delattr(self, name). | | __getattribute__(self, name, /) | Return getattr(self, name). | | __reduce__(...) | Helper for pickle. | | __repr__(self, /) | Return repr(self). | | __setattr__(self, name, value, /) | Implement setattr(self, name, value). | | __setstate__(...) | | __str__(self, /) | Return str(self). | | with_traceback(...) | Exception.with_traceback(tb) -- | set self.__traceback__ to tb and return self. | | ---------------------------------------------------------------------- | Data descriptors inherited from builtins.BaseException: | | __cause__ | exception cause | | __context__ | exception context | | __dict__ | | __suppress_context__ | | __traceback__ | | args class TimeoutError(ProcessError) | Method resolution order: | TimeoutError | ProcessError | builtins.Exception | builtins.BaseException | builtins.object | | Data descriptors inherited from ProcessError: | | __weakref__ | list of weak references to the object (if defined) | | ---------------------------------------------------------------------- | Methods inherited from builtins.Exception: | | __init__(self, /, *args, **kwargs) | Initialize self. See help(type(self)) for accurate signature. | | ---------------------------------------------------------------------- | Static methods inherited from builtins.Exception: | | __new__(*args, **kwargs) from builtins.type | Create and return a new object. See help(type) for accurate signature. | | ---------------------------------------------------------------------- | Methods inherited from builtins.BaseException: | | __delattr__(self, name, /) | Implement delattr(self, name). | | __getattribute__(self, name, /) | Return getattr(self, name). | | __reduce__(...) | Helper for pickle. | | __repr__(self, /) | Return repr(self). | | __setattr__(self, name, value, /) | Implement setattr(self, name, value). | | __setstate__(...) | | __str__(self, /) | Return str(self). | | with_traceback(...) | Exception.with_traceback(tb) -- | set self.__traceback__ to tb and return self. | | ---------------------------------------------------------------------- | Data descriptors inherited from builtins.BaseException: | | __cause__ | exception cause | | __context__ | exception context | | __dict__ | | __suppress_context__ | | __traceback__ | | args FUNCTIONS Array(typecode_or_type, size_or_initializer, *, lock=True) method of multiprocessing.context.DefaultContext instance Returns a synchronized shared array Barrier(parties, action=None, timeout=None) method of multiprocessing.context.DefaultContext instance Returns a barrier object BoundedSemaphore(value=1) method of multiprocessing.context.DefaultContext instance Returns a bounded semaphore object Condition(lock=None) method of multiprocessing.context.DefaultContext instance Returns a condition object Event() method of multiprocessing.context.DefaultContext instance Returns an event object JoinableQueue(maxsize=0) method of multiprocessing.context.DefaultContext instance Returns a queue object Lock() method of multiprocessing.context.DefaultContext instance Returns a non-recursive lock object Manager() method of multiprocessing.context.DefaultContext instance Returns a manager associated with a running server process The managers methods such as `Lock()`, `Condition()` and `Queue()` can be used to create shared objects. Pipe(duplex=True) method of multiprocessing.context.DefaultContext instance Returns two connection object connected by a pipe Pool(processes=None, initializer=None, initargs=(), maxtasksperchild=None) method of multiprocessing.context.DefaultContext instance Returns a process pool object Queue(maxsize=0) method of multiprocessing.context.DefaultContext instance Returns a queue object RLock() method of multiprocessing.context.DefaultContext instance Returns a recursive lock object RawArray(typecode_or_type, size_or_initializer) method of multiprocessing.context.DefaultContext instance Returns a shared array RawValue(typecode_or_type, *args) method of multiprocessing.context.DefaultContext instance Returns a shared object Semaphore(value=1) method of multiprocessing.context.DefaultContext instance Returns a semaphore object SimpleQueue() method of multiprocessing.context.DefaultContext instance Returns a queue object Value(typecode_or_type, *args, lock=True) method of multiprocessing.context.DefaultContext instance Returns a synchronized shared object active_children() Return list of process objects corresponding to live child processes allow_connection_pickling() method of multiprocessing.context.DefaultContext instance Install support for sending connections and sockets between processes cpu_count() method of multiprocessing.context.DefaultContext instance Returns the number of CPUs in the system current_process() Return process object representing the current process freeze_support() method of multiprocessing.context.DefaultContext instance Check whether this is a fake forked process in a frozen executable. If so then run code specified by commandline and exit. get_all_start_methods() method of multiprocessing.context.DefaultContext instance get_context(method=None) method of multiprocessing.context.DefaultContext instance get_logger() method of multiprocessing.context.DefaultContext instance Return package logger -- if it does not already exist then it is created. get_start_method(allow_none=False) method of multiprocessing.context.DefaultContext instance log_to_stderr(level=None) method of multiprocessing.context.DefaultContext instance Turn on logging and add a handler which prints to stderr parent_process() Return process object representing the parent process set_executable(executable) method of multiprocessing.context.DefaultContext instance Sets the path to a python.exe or pythonw.exe binary used to run child processes instead of sys.executable when using the 'spawn' start method. Useful for people embedding Python. set_forkserver_preload(module_names) method of multiprocessing.context.DefaultContext instance Set list of module names to try to load in forkserver process. This is really just a hint. set_start_method(method, force=False) method of multiprocessing.context.DefaultContext instance DATA __all__ = ['Array', 'AuthenticationError', 'Barrier', 'BoundedSemaphor... FILE /usr/lib/python3.10/multiprocessing/__init__.py
Generated by phpMan Author: Che Dong Under GNU General Public License
2026-06-02 05:15 @216.73.216.198 CrawledBy Mozilla/5.0 AppleWebKit/537.36 (KHTML, like Gecko; compatible; ClaudeBot/1.0; +claudebot@anthropic.com)