2024年10月にリリースされたPython 3. 13。その中でもっとも注目すべき実験的な新機能の 「free threading」 について紹介します。本記事ではfree threadingについて紹介するにあたり、避けては通れない 「Global Interpreter Lock (以下GIL⁠)⁠」というCPythonのロック機構 ...
本記事はアルバイトとして勤務されている加藤大地さんによる寄稿です。 はじめに Python 3.13 より、PEP 703 で提案された free threading が実験的にサポートされるようになりました。これまで、Python(厳密にはCPython)のインタプリタでは、global interpreter lock (GIL ...
Threading is a technique in Python to run multiple operations concurrently in the same process space. It is particularly useful for I/O-bound tasks, such as reading from a file or network operations, ...
An experimental ‘no-GIL’ build mode in Python 3.13 disables the Global Interpreter Lock to enable true parallel execution in Python. Here’s where to start. The single biggest new feature in Python ...
プログラムで、大規模なファイルのダウンロードや、時間のかかるAPIリクエストといった重い処理を実行すると、その処理が終わるまでプログラム全体が「フリーズ」してしまい、ユーザーは何も操作できなくなります。 これは、プログラムが通常、一度に ...
Parallelism comes down to the ability to segment a task into pieces that can be worked on at the same time, he said, but not all tasks can be. If it takes him an hour to solve a Rubik's Cube, he asked ...