Results of 1 - 10 of about 18 for consumer (0.005 sec.)
- asyncio and free-threaded Python — Python 3.14.8 ドキュメント 13400
- ナビゲーション 索引 モジュール | 次へ | 前へ | Python » 3.14.8 Documentation » The Python standard library » ネットワーク通信とプロセス間通信 » asyncio --- 非同期 I/O » asyncio and free-threaded Python テーマ 自動 ライト ダーク | asyncio an
...t. The threads execute concurrently, and in a free-threaded build they can run on separate CPU cores in parallel. Producer/consumer across threads ¶ When a regular (non-asyncio) thread needs to hand work to an asyncio event loop running in another thread...ue . Queue [ int ]) -> None : for i in range ( 5 ): print ( f "Producing { i } " ) q . put ( i ) q . shutdown () async def consumer ( q : queue . Queue [ int ]) -> None : while True : try : item = q . get_nowait () except queue . Empty : await asyncio ....tDown : break print ( f "Consumed { item } " ) await asyncio . sleep ( item ) q : queue . Queue [ int ] = queue . Queue () consumer_thread = threading . Thread ( target = lambda : asyncio . run ( consumer ( q )) ) consumer_thread . start () producer ( q... - https://man.mtool.work/python/3.14/library/asyncio-threading.html
- asyncio and free-threaded Python — Python 3.14.8 ドキュメント 13400
- ナビゲーション 索引 モジュール | 次へ | 前へ | Python » 3.14.8 Documentation » The Python standard library » ネットワーク通信とプロセス間通信 » asyncio --- 非同期 I/O » asyncio and free-threaded Python テーマ 自動 ライト ダーク | asyncio an
...t. The threads execute concurrently, and in a free-threaded build they can run on separate CPU cores in parallel. Producer/consumer across threads ¶ When a regular (non-asyncio) thread needs to hand work to an asyncio event loop running in another thread...ue . Queue [ int ]) -> None : for i in range ( 5 ): print ( f "Producing { i } " ) q . put ( i ) q . shutdown () async def consumer ( q : queue . Queue [ int ]) -> None : while True : try : item = q . get_nowait () except queue . Empty : await asyncio ....tDown : break print ( f "Consumed { item } " ) await asyncio . sleep ( item ) q : queue . Queue [ int ] = queue . Queue () consumer_thread = threading . Thread ( target = lambda : asyncio . run ( consumer ( q )) ) consumer_thread . start () producer ( q... - https://man.mtool.work/python/3.14/library/asyncio-threading.html
- asyncio での開発 — Python 3.14.8 ドキュメント 8304
- ナビゲーション 索引 モジュール | 次へ | 前へ | Python » 3.14.8 Documentation » The Python standard library » ネットワーク通信とプロセス間通信 » asyncio --- 非同期 I/O » asyncio での開発 テーマ 自動 ライト ダーク | asyncio での開発 ¶ 非同期プ
...nsistent state of the async generator and can cause errors. Let's consider the following example: import asyncio async def consumer (): for idx in range ( 100 ): await asyncio . sleep ( 0 ) message = yield idx print ( 'received' , message ) async def ama...in (): agenerator = consumer () await agenerator . asend ( None ) fa = asyncio . create_task ( agenerator . asend ( 'A' )) fb = asyncio . create_task (... - https://man.mtool.work/python/3.14/library/asyncio-dev.html
- asyncio での開発 — Python 3.14.8 ドキュメント 8304
- ナビゲーション 索引 モジュール | 次へ | 前へ | Python » 3.14.8 Documentation » The Python standard library » ネットワーク通信とプロセス間通信 » asyncio --- 非同期 I/O » asyncio での開発 テーマ 自動 ライト ダーク | asyncio での開発 ¶ 非同期プ
...nsistent state of the async generator and can cause errors. Let's consider the following example: import asyncio async def consumer (): for idx in range ( 100 ): await asyncio . sleep ( 0 ) message = yield idx print ( 'received' , message ) async def ama...in (): agenerator = consumer () await agenerator . asend ( None ) fa = asyncio . create_task ( agenerator . asend ( 'A' )) fb = asyncio . create_task (... - https://man.mtool.work/python/3.14/library/asyncio-dev.html
- queue --- 同期キュークラス — Python 3.14.8 ドキュメント 8064
- ナビゲーション 索引 モジュール | 次へ | 前へ | Python » 3.14.8 Documentation » The Python standard library » 並行実行 » queue --- 同期キュークラス テーマ 自動 ライト ダーク | queue --- 同期キュークラス ¶ ソースコード: Lib/queue.py The queue
...module implements multi-producer, multi-consumer queues. It is especially useful in threaded programming when information must be exchanged safely between multiple threads... - https://man.mtool.work/python/3.14/library/queue.html
- queue --- 同期キュークラス — Python 3.14.8 ドキュメント 8064
- ナビゲーション 索引 モジュール | 次へ | 前へ | Python » 3.14.8 Documentation » The Python standard library » 並行実行 » queue --- 同期キュークラス テーマ 自動 ライト ダーク | queue --- 同期キュークラス ¶ ソースコード: Lib/queue.py The queue
...module implements multi-producer, multi-consumer queues. It is especially useful in threaded programming when information must be exchanged safely between multiple threads... - https://man.mtool.work/python/3.14/library/queue.html
- 用語集 — Python 3.14.8 ドキュメント 7978
- ナビゲーション 索引 モジュール | 次へ | 前へ | Python » 3.14.8 Documentation » 用語集 テーマ 自動 ライト ダーク | 用語集 ¶ >>> ¶ 対話型 シェルにおけるデフォルトの Python プロンプトです。インタープリターで対話的に実行されるコード例でよく見ら
...nditions and ensure thread-safe access to shared data. Alternative design patterns to locks exist such as queues, producer/consumer patterns, and thread-local state. See also deadlock , and reentrant . lock-free ¶ An operation that does not acquire any l...Lock , RLock , Semaphore , Condition , Event , and Barrier . Additionally, the queue module provides multi-producer, multi-consumer queues that are especially useful in multithreaded programs. These primitives help prevent race conditions and coordinate... - https://man.mtool.work/python/3.14/glossary.html
- importlib.metadata -- パッケージメタデータへのアクセス — Python 3.14.8 ドキュメ... 7978
- ナビゲーション 索引 モジュール | 次へ | 前へ | Python » 3.14.8 Documentation » The Python standard library » モジュールのインポート » importlib.metadata -- パッケージメタデータへのアクセス テーマ 自動 ライト ダーク | importlib.metadata -- パ
...th オブジェクトを優先的に使用します。 Implementing Custom Providers ¶ importlib.metadata address two API surfaces, one for consumers and another for providers . Most users are consumers, consuming metadata provided by the packages. There are other use-ca...h and .name properties indicating the path to search and name to match and may supply other relevant context sought by the consumer. In practice, to support finding distribution package metadata in locations other than the file system, subclass Distribut... - https://man.mtool.work/python/3.14/library/importlib.metadata.html
- 用語集 — Python 3.14.8 ドキュメント 7978
- ナビゲーション 索引 モジュール | 次へ | 前へ | Python » 3.14.8 Documentation » 用語集 テーマ 自動 ライト ダーク | 用語集 ¶ >>> ¶ 対話型 シェルにおけるデフォルトの Python プロンプトです。インタープリターで対話的に実行されるコード例でよく見ら
...nditions and ensure thread-safe access to shared data. Alternative design patterns to locks exist such as queues, producer/consumer patterns, and thread-local state. See also deadlock , and reentrant . lock-free ¶ An operation that does not acquire any l...Lock , RLock , Semaphore , Condition , Event , and Barrier . Additionally, the queue module provides multi-producer, multi-consumer queues that are especially useful in multithreaded programs. These primitives help prevent race conditions and coordinate... - https://man.mtool.work/python/3.14/glossary.html
- importlib.metadata -- パッケージメタデータへのアクセス — Python 3.14.8 ドキュメ... 7978
- ナビゲーション 索引 モジュール | 次へ | 前へ | Python » 3.14.8 Documentation » The Python standard library » モジュールのインポート » importlib.metadata -- パッケージメタデータへのアクセス テーマ 自動 ライト ダーク | importlib.metadata -- パ
...th オブジェクトを優先的に使用します。 Implementing Custom Providers ¶ importlib.metadata address two API surfaces, one for consumers and another for providers . Most users are consumers, consuming metadata provided by the packages. There are other use-ca...h and .name properties indicating the path to search and name to match and may supply other relevant context sought by the consumer. In practice, to support finding distribution package metadata in locations other than the file system, subclass Distribut... - https://man.mtool.work/python/3.14/library/importlib.metadata.html