HN2new | past | comments | ask | show | jobs | submitlogin

Except under Linux fork() has COW semantics, so only heap variables that change will be copied, thou I suspect that could be a large portion of a Python process anyway


Yes the operation is quite efficient, the problem is that fork() normally makes reloading of code (without resorting to special tricks) impossible, as the interpreter will usually already have loaded all imports before forking. The only way to circumvent this would be to delay the loading of required modules until after the fork.




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: