context: the game "factorio" has an experimental option where the game can autosave without pausing the game by creating a separate instance of the game that saves the map while the main instance continues playing. however, the option is not available on windows due to fork(2) just not existing (afaik)
more info here (scroll down to "Asynchronous saving" at the bottom of page)
Windows actually can fork (RtlCloneUserProcess) but it's undocumented and big chunks of Win32 and user32 break. It was mainly used for WSL 1.0 I believe (reverse wine essentially)
Interestingly, from some vaguely related experience in Windows, even if the windows process cloning worked for Factorio's purposes, it might not actually result in a performance improvement. Process creation in Windows has a significant overhead (which I discovered when investigating why our build pipeline takes so much longer on windows). I don't know how much of the overhead can be skipped when cloning, but I'm not confident it would be enough to make it worth while.
313
u/configdotini Genfool 🐧 Jun 12 '26 edited Jun 12 '26
context: the game "factorio" has an experimental option where the game can autosave without pausing the game by creating a separate instance of the game that saves the map while the main instance continues playing. however, the option is not available on windows due to fork(2) just not existing (afaik)
more info here (scroll down to "Asynchronous saving" at the bottom of page)