Results of 1 - 10 of about 129 for wait (0.007 sec.)
- 同期プリミティブ — Python 3.14.8 ドキュメント 11793
- ナビゲーション 索引 モジュール | 次へ | 前へ | Python » 3.14.8 Documentation » The Python standard library » ネットワーク通信とプロセス間通信 » asyncio --- 非同期 I/O » 同期プリミティブ テーマ 自動 ライト ダーク | 同期プリミティブ ¶ ソースコ
...を使ってください); 同期プリミティブのメソッドは timeout 引数を受け付けません; タイムアウトを伴う操作を実行するには asyncio.wait_for() 関数を使ってください。 asyncio モジュールは以下の基本的な同期プリミティブを持っています: Lock Event Condition Semaph...() # ... later async with lock : # access shared state これは以下のコードと等価です: lock = asyncio . Lock () # ... later await lock . acquire () try : # access shared state finally : lock . release () バージョン 3.10 で変更: loop パラメータが削除され...フラグを管理します。フラグの値は set() メソッドにより true に、また clear() メソッドにより false に設定することができます。 wait() メソッドはフラグが true になるまで処理をブロックします。フラグの初期値は false です。 バージョン 3.10 で変更: loop パラメ... - https://man.mtool.work/python/3.14/library/asyncio-sync.html
- 同期プリミティブ — Python 3.14.8 ドキュメント 11793
- ナビゲーション 索引 モジュール | 次へ | 前へ | Python » 3.14.8 Documentation » The Python standard library » ネットワーク通信とプロセス間通信 » asyncio --- 非同期 I/O » 同期プリミティブ テーマ 自動 ライト ダーク | 同期プリミティブ ¶ ソースコ
...を使ってください); 同期プリミティブのメソッドは timeout 引数を受け付けません; タイムアウトを伴う操作を実行するには asyncio.wait_for() 関数を使ってください。 asyncio モジュールは以下の基本的な同期プリミティブを持っています: Lock Event Condition Semaph...() # ... later async with lock : # access shared state これは以下のコードと等価です: lock = asyncio . Lock () # ... later await lock . acquire () try : # access shared state finally : lock . release () バージョン 3.10 で変更: loop パラメータが削除され...フラグを管理します。フラグの値は set() メソッドにより true に、また clear() メソッドにより false に設定することができます。 wait() メソッドはフラグが true になるまで処理をブロックします。フラグの初期値は false です。 バージョン 3.10 で変更: loop パラメ... - https://man.mtool.work/python/3.14/library/asyncio-sync.html
- threading --- スレッドベースの並列処理 — Python 3.14.8 ドキュメント 9454
- ナビゲーション 索引 モジュール | 次へ | 前へ | Python » 3.14.8 Documentation » The Python standard library » 並行実行 » threading --- スレッドベースの並列処理 テーマ 自動 ライト ダーク | threading --- スレッドベースの並列処理 ¶ ソースコード
...larly useful when tasks are I/O bound, such as file operations or making network requests, where much of the time is spent waiting for external resources. A typical use case for threading includes managing a pool of worker threads that can process mu..., args = ( link ,), kwargs = { "delay" : 2 }) threads . append ( t ) # Start each thread for t in threads : t . start () # Wait for all threads to finish for t in threads : t . join () バージョン 3.7 で変更: このモジュールは以前はオプションでしたが、...ールでは以下の定数も定義しています: threading. TIMEOUT_MAX ¶ ブロックする関数 ( Lock.acquire() , RLock.acquire() , Condition.wait() など) の timeout 引数に許される最大値。これ以上の値を timeout に指定すると OverflowError が発生します。 Added in version... - https://man.mtool.work/python/3.14/library/threading.html
- threading --- スレッドベースの並列処理 — Python 3.14.8 ドキュメント 9454
- ナビゲーション 索引 モジュール | 次へ | 前へ | Python » 3.14.8 Documentation » The Python standard library » 並行実行 » threading --- スレッドベースの並列処理 テーマ 自動 ライト ダーク | threading --- スレッドベースの並列処理 ¶ ソースコード
...larly useful when tasks are I/O bound, such as file operations or making network requests, where much of the time is spent waiting for external resources. A typical use case for threading includes managing a pool of worker threads that can process mu..., args = ( link ,), kwargs = { "delay" : 2 }) threads . append ( t ) # Start each thread for t in threads : t . start () # Wait for all threads to finish for t in threads : t . join () バージョン 3.7 で変更: このモジュールは以前はオプションでしたが、...ールでは以下の定数も定義しています: threading. TIMEOUT_MAX ¶ ブロックする関数 ( Lock.acquire() , RLock.acquire() , Condition.wait() など) の timeout 引数に許される最大値。これ以上の値を timeout に指定すると OverflowError が発生します。 Added in version... - https://man.mtool.work/python/3.14/library/threading.html
- concurrent.futures --- 並列タスク実行 — Python 3.14.8 ドキュメント 9113
- ナビゲーション 索引 モジュール | 次へ | 前へ | Python » 3.14.8 Documentation » The Python standard library » 並行実行 » concurrent.futures --- 並列タスク実行 テーマ 自動 ライト ダーク | concurrent.futures --- 並列タスク実行 ¶ Added in versi
...バージョン 3.5 で変更: chunksize 引数が追加されました。 バージョン 3.14 で変更: buffersize 引数が追加されました。 shutdown ( wait = True , * , cancel_futures = False ) ¶ executor に対して、現在保留中のフューチャーが実行された後で、使用中のすべての資源を...するように伝えます。シャットダウンにより後に Executor.submit() と Executor.map() を呼び出すと RuntimeError が送出されます。 wait が True の場合、すべての未完了のフューチャの実行が完了して Executor に関連付けられたリソースが解放されるまで、このメソッド...は返りません。 wait が False の場合、このメソッドはすぐに返り、すべての未完了のフューチャの実行が完了したときに、 Executor に関連付けられたリソ... - https://man.mtool.work/python/3.14/library/concurrent.futures.html
- concurrent.futures --- 並列タスク実行 — Python 3.14.8 ドキュメント 9113
- ナビゲーション 索引 モジュール | 次へ | 前へ | Python » 3.14.8 Documentation » The Python standard library » 並行実行 » concurrent.futures --- 並列タスク実行 テーマ 自動 ライト ダーク | concurrent.futures --- 並列タスク実行 ¶ Added in versi
...バージョン 3.5 で変更: chunksize 引数が追加されました。 バージョン 3.14 で変更: buffersize 引数が追加されました。 shutdown ( wait = True , * , cancel_futures = False ) ¶ executor に対して、現在保留中のフューチャーが実行された後で、使用中のすべての資源を...するように伝えます。シャットダウンにより後に Executor.submit() と Executor.map() を呼び出すと RuntimeError が送出されます。 wait が True の場合、すべての未完了のフューチャの実行が完了して Executor に関連付けられたリソースが解放されるまで、このメソッド...は返りません。 wait が False の場合、このメソッドはすぐに返り、すべての未完了のフューチャの実行が完了したときに、 Executor に関連付けられたリソ... - https://man.mtool.work/python/3.14/library/concurrent.futures.html
- ストリーム — Python 3.14.8 ドキュメント 8626
- ナビゲーション 索引 モジュール | 次へ | 前へ | Python » 3.14.8 Documentation » The Python standard library » ネットワーク通信とプロセス間通信 » asyncio --- 非同期 I/O » ストリーム テーマ 自動 ライト ダーク | ストリーム ¶ ソースコード: Lib/a
...syncio/streams.py ストリームはネットワークコネクションと合わせて動作する高水準の async/await 可能な基本要素です。ストリームはコールバックや低水準のプロトコルやトランスポートを使うことなくデータを送受信することを可能...ームを使って書いた TCP エコークライアントの例です: import asyncio async def tcp_echo_client ( message ): reader , writer = await asyncio . open_connection ( '127.0.0.1' , 8888 ) print ( f 'Send: { message !r} ' ) writer . write ( message . encode ())...await writer . drain () data = await reader . read ( 100 ) print ( f 'Received: { data . decode () !r} ' ) print ( 'Close the co... - https://man.mtool.work/python/3.14/library/asyncio-stream.html
- ストリーム — Python 3.14.8 ドキュメント 8626
- ナビゲーション 索引 モジュール | 次へ | 前へ | Python » 3.14.8 Documentation » The Python standard library » ネットワーク通信とプロセス間通信 » asyncio --- 非同期 I/O » ストリーム テーマ 自動 ライト ダーク | ストリーム ¶ ソースコード: Lib/a
...syncio/streams.py ストリームはネットワークコネクションと合わせて動作する高水準の async/await 可能な基本要素です。ストリームはコールバックや低水準のプロトコルやトランスポートを使うことなくデータを送受信することを可能...ームを使って書いた TCP エコークライアントの例です: import asyncio async def tcp_echo_client ( message ): reader , writer = await asyncio . open_connection ( '127.0.0.1' , 8888 ) print ( f 'Send: { message !r} ' ) writer . write ( message . encode ())...await writer . drain () data = await reader . read ( 100 ) print ( f 'Received: { data . decode () !r} ' ) print ( 'Close the co... - https://man.mtool.work/python/3.14/library/asyncio-stream.html
- Coroutines and tasks — Python 3.14.8 ドキュメント 8418
- ナビゲーション 索引 モジュール | 次へ | 前へ | Python » 3.14.8 Documentation » The Python standard library » ネットワーク通信とプロセス間通信 » asyncio --- 非同期 I/O » Coroutines and tasks テーマ 自動 ライト ダーク | Coroutines and tasks ¶
...と Task を利用する高レベルの asyncio の API の概略を解説します。 コルーチン ¶ Source code: Lib/asyncio/coroutines.py async/await 構文で宣言された コルーチン は、 asyncio を使ったアプリケーションを書くのに推奨される方法です。例えば、次のコードスニペット..." を出力し、そこから 1 秒待って "world" を出力します: >>> import asyncio >>> async def main (): ... print ( 'hello' ) ... await asyncio . sleep ( 1 ) ... print ( 'world' ) >>> asyncio . run ( main ()) hello world 単にコルーチンを呼び出しただけでは、コ...ます: 最上位のエントリーポイントである "main()" 関数を実行する asyncio.run() 関数 (上の例を参照してください。) コルーチンを await すること。次のコード片は 1 秒間待機した後に "hello" と出力し、 更に 2 秒間待機してから "world" と出力します: import asynci... - https://man.mtool.work/python/3.14/library/asyncio-task.html
- Coroutines and tasks — Python 3.14.8 ドキュメント 8418
- ナビゲーション 索引 モジュール | 次へ | 前へ | Python » 3.14.8 Documentation » The Python standard library » ネットワーク通信とプロセス間通信 » asyncio --- 非同期 I/O » Coroutines and tasks テーマ 自動 ライト ダーク | Coroutines and tasks ¶
...と Task を利用する高レベルの asyncio の API の概略を解説します。 コルーチン ¶ Source code: Lib/asyncio/coroutines.py async/await 構文で宣言された コルーチン は、 asyncio を使ったアプリケーションを書くのに推奨される方法です。例えば、次のコードスニペット..." を出力し、そこから 1 秒待って "world" を出力します: >>> import asyncio >>> async def main (): ... print ( 'hello' ) ... await asyncio . sleep ( 1 ) ... print ( 'world' ) >>> asyncio . run ( main ()) hello world 単にコルーチンを呼び出しただけでは、コ...ます: 最上位のエントリーポイントである "main()" 関数を実行する asyncio.run() 関数 (上の例を参照してください。) コルーチンを await すること。次のコード片は 1 秒間待機した後に "hello" と出力し、 更に 2 秒間待機してから "world" と出力します: import asynci... - https://man.mtool.work/python/3.14/library/asyncio-task.html