concurrent.futures — Launching parallel tasks — Python 3.16.0a0 documentation

docs.python.org

Tin mới

The concurrent package

concurrent.interpreters — Multiple interpreters in the same process

Python Module Index

3.16.0a0 Documentation

The Python Standard Library

Concurrent Execution

asyncio: Asynchronous I/O.

Source code: Lib/concurrent/futures/thread.py, Lib/concurrent/futures/process.py, and Lib/concurrent/futures/interpreter.py

WebAssembly platforms

This module does not work or is not available on WebAssembly. See WebAssembly platforms for more information.

map(fn, *iterables)

The iterables are collected immediately rather than lazily, unless a buffersize is specified to limit the number of submitted tasks whose results have not yet been yielded. If the buffer is full, iteration over the itera

Global Interpreter Lock

The InterpreterPoolExecutor class uses a pool of interpreters to execute calls asynchronously. It is a ThreadPoolExecutor subclass, which means each worker is running in its own thread. The difference here is that each w

InterpreterPoolExecutor¶

The InterpreterPoolExecutor class uses a pool of interpreters to execute calls asynchronously. It is a ThreadPoolExecutor subclass, which means each worker is running in its own thread. The difference here is that each w

builtins: The module that provides the built-in namespace.

The InterpreterPoolExecutor class uses a pool of interpreters to execute calls asynchronously. It is a ThreadPoolExecutor subclass, which means each worker is running in its own thread. The difference here is that each w

pickle: Convert Python objects to streams of bytes and back.

The InterpreterPoolExecutor class uses a pool of interpreters to execute calls asynchronously. It is a ThreadPoolExecutor subclass, which means each worker is running in its own thread. The difference here is that each w

socket: Low-level networking interface.

The InterpreterPoolExecutor class uses a pool of interpreters to execute calls asynchronously. It is a ThreadPoolExecutor subclass, which means each worker is running in its own thread. The difference here is that each w

InterpreterPoolExecutor¶

The InterpreterPoolExecutor class uses a pool of interpreters to execute calls asynchronously. It is a ThreadPoolExecutor subclass, which means each worker is running in its own thread. The difference here is that each w

multiprocessing: Process-based parallelism.

The ProcessPoolExecutor class is an Executor subclass that uses a pool of processes to execute calls asynchronously. ProcessPoolExecutor uses the multiprocessing module, which allows it to side-step the Global Interprete

DeprecationWarning

Changed in version 3.12: On POSIX systems, if your application has multiple threads and the multiprocessing context uses the "fork" start method: The os.fork() function called internally to spawn workers may raise a Depr