per page, with , order by , clip by
Results of 1 - 10 of about 34 for ShutDown (0.007 sec.)
ストリーム 13389
ストリーム ソースコード: Lib/asyncio/streams.py ストリームはネットワークコネクションと合わせて動作する高水準の async/await 可能な基本要素です。ストリームはコールバックや低水準のプロトコルやトランスポートを使うことなくデータを送受信することを ... 0 , proto = 0 , flags = 0 , sock = None , local_addr = None , server_hostname = None , ssl_handshake_timeout = None , ssl_shutdown_timeout = None , happy_eyeballs_delay = None , interleave = None ) ネットワークコネクションを確立し、 (reader, writer) のオ ... lay と interleave が追加されました。 バージョン 3.10 で変更: loop パラメータが削除されました。 バージョン 3.11 で変更: ssl_shutdown_timeout パラメータが追加されました。 async asyncio. start_server ( client_connected_cb , host = None , port = None , * , l ... log = 100 , ssl = None , reuse_address = None , reuse_port = None , keep_alive = None , ssl_handshake_timeout = None , ssl_shutdown_timeout = None , start_serving = True ) ソケットサーバーを起動します。 client_connected_cb コールバックは新しいクライアント ...
https://man.mtool.work/python/3.14/library/asyncio-stream.html
queue --- 同期キュークラス 11999
queue --- 同期キュークラス ソースコード: Lib/queue.py queue モジュールは、複数の生産者と消費者が使えるキューを実装しています。 複数のスレッド間で安全に情報を交換する必要があるスレッドプログラミングで特に役立ちます。 このモジュールの Queue ク ... ueue オブジェクトで、非ブロックメソッド put() (または put_nowait() ) が呼ばれたとき、送出される例外です。 exception queue. ShutDown シャットダウン済みの Queue オブジェクトで put() または get() を呼び出すと送出される例外です。 Added in version 3.13. キュー ... ムを置きます。 できないならば、例外 Full を送出します (この場合 timeout は無視されます)。 キューがシャットダウン済みの場合は ShutDown を送出します。 Queue. put_nowait ( item ) put(item, block=False) と等価です。 Queue. get ( block = True , timeout = None ) ... a SIGINT will not trigger a KeyboardInterrupt . キューがシャットダウン済みで空の場合、または即時シャットダウン済みの場合は ShutDown を送出します。 Queue. get_nowait ( ) get(False) と等価です。 キューに入れられたタスクが全てコンシューマスレッドに処理された ...
https://man.mtool.work/python/3.14/library/queue.html
イベントループ 11391
イベントループ ソースコード: Lib/asyncio/events.py , Lib/asyncio/base_events.py まえがき イベントループは全ての asyncio アプリケーションの中核をなす存在です。イベントループは非同期タスクやコールバックを実行し、ネットワーク I/O を処理し、サブ ... 同じ) であり取り消せません。イベントループがクローズされた後、他のいかなるメソッドも呼び出すべきではありません。 async loop. shutdown_asyncgens ( ) 現在オープンになっているすべての asynchronous generator (非同期ジェネレータ) オブジェクトをスケジュールし、 ... 呼び出す必要はありません。 以下はプログラム例です: try : loop . run_forever () finally : loop . run_until_complete ( loop . shutdown_asyncgens ()) loop . close () Added in version 3.6. async loop. shutdown_default_executor ( timeout = None ) デフォルトの ... 0 , proto = 0 , flags = 0 , sock = None , local_addr = None , server_hostname = None , ssl_handshake_timeout = None , ssl_shutdown_timeout = None , happy_eyeballs_delay = None , interleave = None , all_errors = False ) host と port で指定されたアドレスと ...
https://man.mtool.work/python/3.14/library/asyncio-eventloop.html
ソケットプログラミング HOWTO 10768
ソケットプログラミング HOWTO Author : Gordon McMillan 概要 ソケットはそこかしこで使われているが、最大級に誤解されている技術でもある。この文書はソケットの全体像を俯瞰しており、チュートリアルとしてはあまり役に立たない。実際に動くモノを完成させ ... course, this doesn't fit well with fixed-length messages. Decisions, decisions. 切断 厳密には、ソケットを close する前には shutdown することになっている。 shutdown は相手ソケットに対する報告であり、渡す引数によって「これ以上こっちからは送らないけど、まだ ... した!」だったりする。しかしほとんどのソケットライブラリは、このエチケットを怠るプログラマに慣れてしまって、通常 close だけで shutdown(); close() と同じことになる。だから大抵はわざわざ shutdown しなくてもいい。 shutdown の効果的な使い方のひとつは、HTTP 風の ... やりとりだ。クライアントは要求を出してすぐに shutdown(1) する。これでサーバに、「クライアントは送信完了ですが、まだ受信可能です」と伝わる。サーバは 0 バイト受信で "EOF" を検出す ...
https://man.mtool.work/python/3.14/howto/sockets.html
asyncio とフリースレッド Python 10305
asyncio とフリースレッド Python asyncio uses an event loop as a scheduler to enable highly efficient concurrency by switching between tasks to allow non-blocking I/O operations. This results in better performance for I/O-bound use cases. It ... def producer ( q : queue . 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 . Em ... pty : await asyncio . sleep ( 0.1 ) continue except queue . ShutDown : break print ( f "Consumed { item } " ) await asyncio . sleep ( item ) q : queue . Queue [ int ] = queue . Queue () consu ... ough queue.Queue . When the queue is empty the consumer sleeps briefly and tries again. When the producer is done it calls shutdown() , which causes subsequent get_nowait() calls to raise queue.ShutDown so the consumer can exit cleanly. 他のマニュアルの関 ...
https://man.mtool.work/python/3.14/library/asyncio-threading.html
socketserver --- ネットワークサーバーのフレームワーク 8452
socketserver --- ネットワークサーバーのフレームワーク ソースコード: Lib/socketserver.py socketserver モジュールを使うと、ネットワークサーバを簡単に作成できます。 利用可能な環境 : not WASI. このモジュールは WebAssembly では動作しないか、利用 ... エストが来なかった場合、 handle_timeout() が呼ばれて、 handle_request() が終了します。 serve_forever ( poll_interval = 0.5 ) shutdown() が明示的に要求されるまで、要求を処理します。 poll_interval 秒ごとに終了要求の有無を調べます。 timeout 属性は無視します。 ... 。 サブクラスやミクシンクラスでオーバーライドして、クリーンアップなどのサービス固有の処理を行えます。 Added in version 3.3. shutdown ( ) serve_forever() のループに停止を指示し、停止するまで待ちます。 shutdown() は、 serve_forever() が別のスレッドで実行され ... ent ( ip , port , "Hello World 1" ) client ( ip , port , "Hello World 2" ) client ( ip , port , "Hello World 3" ) server . shutdown () この例の出力は次のようになります: $ python ThreadedTCPServer.py Server loop running in thread: Thread-1 Received: Threa ...
https://man.mtool.work/python/3.14/library/socketserver.html
concurrent.futures --- 並列タスク実行 8308
concurrent.futures --- 並列タスク実行 Added in version 3.2. ソースコード: Lib/concurrent/futures/thread.py 、 Lib/concurrent/futures/process.py および Lib/concurrent/futures/interpreter.py concurrent.futures モジュールは、呼び出し可能オブジ ... りません。 バージョン 3.5 で変更: chunksize 引数が追加されました。 バージョン 3.14 で変更: buffersize 引数が追加されました。 shutdown ( wait = True , * , cancel_futures = False ) executor に対して、現在保留中のフューチャーが実行された後で、使用中のすべての ... て使えば、このメソッドを明示的に呼び出す必要はありません。 Executor はシャットダウンされます ( wait を True にして Executor.shutdown() を呼び出した場合と同様に待機します)。 import shutil with ThreadPoolExecutor ( max_workers = 4 ) as e : e . submit ( shut ... minate を呼び出し、直ちに終了させようとします。 executor に関連するその他のリソースをすべて解放するため、内部では Executor.shutdown() も呼び出します。 このメソッドを呼び出した後は、executor にタスクを投入しないでください。 Added in version 3.14. kill_wor ...
https://man.mtool.work/python/3.14/library/concurrent.futures.html
multiprocessing --- プロセスベースの並列処理 8148
multiprocessing --- プロセスベースの並列処理 ソースコード: Lib/multiprocessing/ 利用可能な環境 : not Android, not iOS, not WASI. このモジュールは モバイルプラットフォーム と WebAssemblyプラットフォーム をサポートしません。 はじめに multipro ... ュールの通常の queue.Empty や queue.Full 例外がタイムアウトを伝えるために送出されます。 Queue は、 task_done() 、 join() 、 shutdown() を除く queue.Queue のすべてのメソッドを実装しています。 qsize ( ) おおよそのキューのサイズを返します。マルチスレッディン ... : class multiprocessing.managers. BaseManager ( address = None , authkey = None , serializer = 'pickle' , ctx = None , * , shutdown_timeout = 1.0 ) BaseManager オブジェクトを作成します。 作成後、 start() または get_server().serve_forever() を呼び出して、 ... 合、この呼び出しによってグローバルな開始方式が設定されることがあります。 詳しくは グローバルな開始方式 を参照してください。 shutdown_timeout は、 shutdown() メソッドで、マネージャーが使うプロセスの終了を待つタイムアウトを秒単位で指定します。 シャットダウン ...
https://man.mtool.work/python/3.14/library/multiprocessing.html
asyncio での開発 7844
asyncio での開発 非同期プログラミングは、従来の「逐次的」なプログラミングとは異なります。 このページはよくある間違いや落とし穴を列挙し、それらを回避する方法を説明します。 デバッグモード asyncio はデフォルトで本運用モードで実行されます。いっ ... ws (): break break asyncio . run ( main ()) この例の出力は次のようになります。 unhandled exception during asyncio . run () shutdown task : < Task finished name = 'Task-3' coro =<< async_generator_athrow without __name__ > () > exception = AssertionError ... でコールバック関数を登録します。 これらのコールバックは、実行中の非同期ジェネレーターの一覧を更新し、整合性を保ちます。 loop.shutdown_asyncgens() 関数が呼び出されると、実行中のジェネレーターの終了処理を行い、一覧を空にします。 非同期ジェネレーターは、最初の ...
https://man.mtool.work/python/3.14/library/asyncio-dev.html
変更履歴 7844
変更履歴 次の Python バージョン リリース日: XXXX-XX-XX セキュリティ gh-160499 : Fix unbounded memory growth in asyncio TLS connections when a peer stops reading but keeps sending records that make OpenSSL generate its own replies (such as T ... ict before the compression of already submitted data has finished. gh-160520 : Fix asyncio SSL transports not applying ssl_shutdown_timeout when the peer has sent EOF but does not read the data still queued for it. Closing such a connection could wait in ... ようにしました。 gh-159041 : Fix a use-after-free in asyncio task bookkeeping when a finalizer creates a task during thread shutdown. gh-158973 : Reset the warnings lock in the child after os.fork() , before clearing other threads' states, to avoid deadlo ... ーを通る循環参照は回収されず、反復対象のコンテキスト全体がリークしていました。 gh-154937 : free-threaded build で、 _thread._shutdown() が非デーモンスレッドの起動と並行して実行された場合の、スレッドハンドル識別子のデータ競合を修正しました。 gh-154902 : __c ...
https://man.mtool.work/python/3.14/whatsnew/changelog.html
PREV 1 2 3 4 NEXT