Re:Unlocking Python's Cores:Energy Implications of Removing ...
by kccqzy on Monday March 09, 2026 @01:40PM
(#47312431)
If you have enough discipline to make sure you only create threads after all the forking is done, then sure. But having such discipline is harder than just forbidding fork or forbidding threads in your program. It turns a careful analysis of timing and causality into just banning a few functions.
[ Parent
| on HN ]
Re:Unlocking Python's Cores:Energy Implications of Removing ...
by josefx on Monday March 09, 2026 @04:40PM
(#47315184)
Can't you check what threads are active at the time you fork?
Re:Unlocking Python's Cores:Energy Implications of Removing ...
by kccqzy on Monday March 09, 2026 @06:30PM
(#47316608)
And what do you do with that information? Refuse to fork after you detect more than one thread running? I haven’t seen any code that gracefully handles the unable-to-fork scenario. When people write fork-based code, especially in Python, they always expect forking to succeed.