回答編集履歴
1
追記
test
CHANGED
@@ -1,3 +1,6 @@
|
|
1
1
|
threading: メモリ(変数)共有、スレッドセーフな作りにする必要がある
|
2
2
|
multiprocessing: メモリ独立、プロセス間通信でデータをやりとり
|
3
3
|
asyncio: 非同期処理、並列実行ではない
|
4
|
+
|
5
|
+
https://docs.python.org/ja/3/library/threading.html#module-threading
|
6
|
+
> アプリケーションにマルチコアマシンの計算能力をより良く利用させたい場合は、 multiprocessing モジュールや concurrent.futures.ProcessPoolExecutor の利用をお勧めします。 ただし、I/Oバウンドなタスクを並行して複数走らせたい場合においては、 マルチスレッドは正しい選択肢です。
|