Am I correct in finding that the Python runtime can't schedule multiple threads across multiple CPU cores?
As an example:
```
from concurrent.futures import ThreadPoolExecutor as PoolExecutor
def fn(lst) -> int:
# do something computationally expensive
with PoolExecutor(max_workers=10) as executor:
total = sum(executor.map(fn, lst))
```
This code (with the stub filled out appropriately) runs on a single core of my 10-core M1 Pro CPU, and the results are no faster than the synchronous version of the code.
My version info:
Python 3.13.1 (v3.13.1:06714517797, Dec 3 2024, 14:00:22) [Clang 15.0.0 (clang-1500.3.9.4)] on darwin
PyCharm 2025.1
Build #PY-251.23774.444, built on April 14, 2025
Runtime version: 21.0.6+9-b895.109 aarch64 (JCEF 122.1.9)
VM: OpenJDK 64-Bit Server VM by JetBrains s.r.o.
MacBook Pro 14-inch, 2021
Chip: Apple M1 Pro
Memory: 32 GB
macOS Sequoia 15.4.1
https://www.walknews.com/852724/ 欧州11カ国がメルコスルとのFTA締結に向け協議、米関税で方針転換か | ロイター #AGRI #AMERS #AR #BR #COM #DEST:NOJPWDM #EMEA #EMRG #EU #EUROP #Europe #EuropeNews #EuropeanUnion #EZC #FR #GEN #INTAG #JFOR #JLN #LATAM #NAMER #POL #PY #SAMER #TOPCMB #TOPNWS #TRD #TRF #TRN #US #WEU #ヨーロッパ #ヨーロッパニュース #欧州 #欧州連合
https://www.walknews.com/849576/ アングル:アルゼンチン止まらぬ物価高、隣国の町もゴーストタウン化 | ロイター #AMERS #ANLINS #AR #Argentina #BACT #BIZ #BKRT #BO #BOJJ #BR #CDM #CEN #CL #CMPNY #COEN #COEN08 #COEN1 #CORPD #DBT #DBTR #DEVAL #DLI #ECI #ECO #ECON #EMRG #FES #FRX #GEN #GRAPHC #HLF #HLQ #HLS #INDS #INDS08 #INFL #ISER #ISER08 #JFOR #JLN #LATAM #MCE #MTGFX #NEWS1 #ODD #POL #PRIVT #PY #SAMER #SOCI #TOPCMB #TOPNWS #TOUR #TRN #UY #アルゼンチン
https://www.walknews.com/845274/ EUと南米、FTAで合意 発効手続きは難航の可能性 | ロイター #AMERS #ANIM #AR #BR #BRU #CEEU #DE #DEFOR #DEST:NOJPTPM #DEST:NOJPWDM #DEST:NOJPZTM #DIP #EMEA #EMRG #ENV #EU #EUROP #Europe #EuropeNews #EuropeanUnion #EZC #FR #GEN #INTAG #JFOR #JLN #LATAM #MTPIX #MTVID #NATU #NEWS1 #POL #PY #RSBI:DEFORESTATION #SAMER #TOPCMB #TOPNWS #TRD #TRF #TRN #UY #WEU #ヨーロッパ #ヨーロッパニュース #欧州 #欧州連合
https://www.wacoca.com/news/2485837/ EUと南米、FTAで合意 発効手続きは難航の可能性 | ロイター #AMERS #anim #ar #BR #BRU #CEEU #de #DEFOR #DEST:NOJPTPM #DEST:NOJPWDM #DEST:NOJPZTM #dip #EMEA #EMRG #ENV #EU #EUROP #Europe #EuropeanUnion #EZC #fr #Gen #INTAG #JFOR #JLN #LATAM #MTPIX #MTVID #NATU #NEWS1 #POL #PY #RSBI:DEFORESTATION #SAMER #TOPCMB #TOPNWS #TRD #TRF #TRN #UY #WEU #ヨーロッパ #欧州 #欧州連合
🐍 Python in One Minute 😮
Python is one of the most versatile, powerful, and beginner-friendly programming languages out there! Whether you're building web applications, automating tasks, or diving into data science and AI, Python has you covered. With its clean and readable syntax, Python allows developers to bring ideas to life quickly and efficiently. 🚀
#Python #PythonProgramming #Python3 #Py #LearnPython #CodeLife #Programming