per page, with , order by , clip by
Results of 1 - 9 of about 9 for workers (0.010 sec.)
concurrent.futures --- 並列タスク実行 13463
concurrent.futures --- 並列タスク実行 Added in version 3.2. ソースコード: Lib/concurrent/futures/thread.py 、 Lib/concurrent/futures/process.py および Lib/concurrent/futures/interpreter.py concurrent.futures モジュールは、呼び出し可能オブジ ... ようにスケジュールし、呼び出し可能オブジェクトの実行を表現する Future オブジェクトを返します。 with ThreadPoolExecutor ( max_workers = 1 ) as executor : future = executor . submit ( pow , 323 , 1235 ) print ( future . result ()) map ( fn , * iterables , t ... wait を True にして Executor.shutdown() を呼び出した場合と同様に待機します)。 import shutil with ThreadPoolExecutor ( max_workers = 4 ) as e : e . submit ( shutil . copy , 'src1.txt' , 'dest1.txt' ) e . submit ( shutil . copy , 'src2.txt' , 'dest2.txt' ... time . sleep ( 5 ) print ( a . result ()) # a は b を待っているため完了しない return 6 executor = ThreadPoolExecutor ( max_workers = 2 ) a = executor . submit ( wait_on_b ) b = executor . submit ( wait_on_a ) 以下でも同様です: def wait_on_future (): f = ...
https://man.mtool.work/python/3.14/library/concurrent.futures.html
compileall --- Python ライブラリをバイトコンパイルする 10119
compileall --- Python ライブラリをバイトコンパイルする ソースコード: Lib/compileall.py このモジュールは、Python ライブラリのインストールを助けるユーティリティ関数群を提供します。この関数群は、ディレクトリツリー内の Python ソースファイルをコ ... xlevels = sys.getrecursionlimit() , ddir = None , force = False , rx = None , quiet = 0 , legacy = False , optimize = -1 , workers = 1 , invalidation_mode = None , * , stripdir = None , prependdir = None , limit_sl_dest = None , hardlink_dupes = False ) ... 数に渡されます。 最適化レベルのシーケンスも受け付け、その場合は一回の呼び出しで一つの .py ファイルを複数回コンパイルします。 workers 引数は、ファイルを並列にコンパイルするワーカーの数を指定します。 デフォルトでは複数のワーカーを使いません。 複数のワーカー ... を使えないプラットフォームで workers 引数が指定された場合は、逐次コンパイルにフォールバックします。 workers が 0 の場合は、システムのコア数が使われます。 worke ...
https://man.mtool.work/python/3.14/library/compileall.html
Logging クックブック 9706
Logging クックブック Author : Vinay Sajip <vinay_sajip at red-dove dot com> このページは、過去に有用であるとされていた、logging に関連するいくつものレシピを含んでいます。チュートリアルやリファレンス情報へのリンクについては その他のリソース ... ef worker_process ( queue , configurer ): configurer ( queue ) name = multiprocessing . current_process () . name print ( 'Worker started: %s ' % name ) for i in range ( 10 ): time . sleep ( random ()) logger = logging . getLogger ( choice ( LOGGERS )) ... ener = multiprocessing . Process ( target = listener_process , args = ( queue , listener_configurer )) listener . start () workers = [] for i in range ( 10 ): worker = multiprocessing . Process ( target = worker_process , args = ( queue , worker_configu ... rer )) workers . append ( worker ) worker . start () for w in workers : w . join () queue . put_nowait ( None ) listener . join () if __n ...
https://man.mtool.work/python/3.14/howto/logging-cookbook.html
compression.zstd --- Zstandard 形式に対応した圧縮 8556
compression.zstd --- Zstandard 形式に対応した圧縮 Added in version 3.14. ソースコード: Lib/compression/zstd/__init__.py このモジュールは、Zstandard (または zstd ) 圧縮アルゴリズムを使ってデータを圧縮・展開するクラスと関数を提供します。 zstd ... 、辞書の ID をフレームヘッダーに書き込みます。 True または 1 は辞書 ID の保存を有効にし、 False または 0 は無効にします。 nb_workers 並列に圧縮するために起動するスレッド数を選択します。 nb_workers が 0 より大きい場合、マルチスレッド圧縮が有効になります。 ... します。 値を 0 にすると、マルチスレッド処理が無効になります。 job_size 圧縮ジョブのサイズ (バイト単位) です。 この値は、 nb_workers が 1 以上の場合にのみ適用されます。 各圧縮ジョブは並列に実行されるため、この値はアクティブなスレッド数に間接的に影響する場 ... ジョブで圧縮時の後方参照ウィンドウに使うために、前のジョブ (スレッド) から再読み込みするデータ量を設定します。 この値は、 nb_workers が 1 以上の場合にのみ使われます。 指定できる値は 0 から 9 です。 0 は重複量を動的に設定することを意味します 1 は重複なしを ...
https://man.mtool.work/python/3.14/library/compression.zstd.html
キュー 8034
キュー ソースコード: Lib/asyncio/queues.py asyncio キューは queue モジュールのクラス群と同じ形になるように設計されています。 asyncio キューはスレッドセーフではありませんが、それらは async/await コードから使われるために特別に設計されています ... のキャンセルが完了するまで待つ。 await asyncio . gather ( * tasks , return_exceptions = True ) print ( '====' ) print ( f '3 workers slept in parallel for { total_slept_for : .2f } seconds' ) print ( f 'total expected sleep time: { total_sleep_time : .2f ...
https://man.mtool.work/python/3.14/library/asyncio-queue.html
What's new in Python 3.14 7819
What's new in Python 3.14 エディタ : Adam Turner と Hugo van Kemenade この記事では Python 3.13 と比較した Python 3.14 の新機能を解説します。Python 3.14 は2025年10月7日にリリースされました。全詳細については 変更履歴 をご覧ください。 参考 PEP ... forkserver の制限 を参照してください。 (Gregory P. Smith が gh-84559 で貢献しました。) ProcessPoolExecutor に、 terminate_workers() と kill_workers() という二つのメソッドを追加しました。 指定したプールで生存しているワーカープロセスをすべて終了、または強 ...
https://man.mtool.work/python/3.14/whatsnew/3.14.html
イベントループ 7711
イベントループ ソースコード: Lib/asyncio/events.py , Lib/asyncio/base_events.py まえがき イベントループは全ての asyncio アプリケーションの中核をなす存在です。イベントループは非同期タスクやコールバックを実行し、ネットワーク I/O を処理し、サブ ... al() を使ってください。 バージョン 3.5.3 で変更: loop.run_in_executor() は内部で生成するスレッドプールエグゼキュータの max_workers を設定せず、代わりにスレッドプールエグゼキュータ ( ThreadPoolExecutor ) にデフォルト値を設定させるようになりました。 loop. ...
https://man.mtool.work/python/3.14/library/asyncio-eventloop.html
What's New In Python 3.2 7711
What's New In Python 3.2 著者 : Raymond Hettinger この記事では Python 3.1 と比較した Python 3.2 の新機能を説明します。 Python 3.2 は 2011 年 2 月 20 日にリリースされました。 主な変更点をいくつか取り上げ、例を示します。 すべての詳細については ... adPoolExecutor の単純な使用例です: import concurrent.futures , shutil with concurrent . futures . ThreadPoolExecutor ( max_workers = 4 ) as e : e . submit ( shutil . copy , 'src1.txt' , 'dest1.txt' ) e . submit ( shutil . copy , 'src2.txt' , 'dest2.txt' ...
https://man.mtool.work/python/3.14/whatsnew/3.2.html
What's New In Python 3.5 7711
What's New In Python 3.5 エディタ : Elvis Pranskevichus < elvis @ magic . io >, Yury Selivanov < yury @ magic . io > この記事では 3.4 と比較した Python 3.5 の新機能を解説します。 Python 3.5 は2015年9月13日にリリースされました。 全詳細につい ... ション -j N を使うと、 N 個のワーカーを同時に動かしてバイトコードを並列にコンパイルできます。 compile_dir() 関数には対応する workers パラメータがあります。 (Contributed by Claudiu Popa in bpo-16104 .) もう一つの新しいオプション -r は、サブディレクトリを再 ...
https://man.mtool.work/python/3.14/whatsnew/3.5.html
PREV 1 NEXT