3 ms·
If the counts were kept somewhere else, they wouldn't pollute, or if you could turn off ref counts for everything allocated before the call to fork, then you wo
by sitkack 3y ago
If the counts were kept somewhere else, they wouldn't pollute, or if you could turn off ref counts for everything allocated before the call to fork, then you would also be good.
The other option is you could allocate all the shared data off of the Python heap prior to the fork call.
- dontlaugh 3y agoInstagram have a system for making some objects immortal before the fork, but it’s not the default behaviour in Python. It’s also not easy to set up in some cases.
- aeyes 3y agoPEP683 finally landed in Python 3.12: https://peps.python.org/pep-0683/ https://peps.python.org/pep-0683/ It's been in Pyston for a while.