Spitballing request: Would Pants on a free thread ...
# development
c
Spitballing request: Would Pants on a free thread Python(+deps) be able to run rules code on multiple cores in a "just works" sort of way, or is there a giant pile of Pants side work to do?
f
Color me interested
w
I'm trying to envision that, as isn't the Rust engine responsible for taking all the asyncio tasks and sending them off to whatever cores/threads already?
c
Yeah, but my understanding from searching "GIL" in this channel is that we can wait on subprocesses and Rust Magic can do it's thing, but only one rule/task/whatever can hold the GIL at a time. https://pantsbuild.slack.com/archives/C0D7TNJHL/p1682713868911109?thread_ts=1682709476.916479&cid=C0D7TNJHL
w
Ah right right
A long time ago I made this coroutine visualizer in the terminal, where you could watch what kicked off whatever else, and see how many are running at once, what's blocked, etc - in realtime - that would be so handy sometimes
f
@aloof-tiger-68736 did some profiling work and saw we were spending lots of time waiting for the GIL.
w
Is any of the infrastructure or test results something that is shareable? Would be nice to be able to contrive a worst case repo
f
I'm working on publishing it, but $dayjob has been nuts this week.
🔥 1
Just mentioning my performance thread over here to cross-reference: https://pantsbuild.slack.com/archives/C0D7TNJHL/p1761162382770779