2 ms·
> Fork doesnt make a lot of sense on win32 processes (how do you handle a forked message loop? Message loops are per-thread and per-HWND (which are thread-affi
by quotemstr 10y ago
> Fork doesnt make a lot of sense on win32 processes (how do you handle a forked message loop?
Message loops are per-thread and per-HWND (which are thread-affine) anyway. One way of making fork "make sense" in win32 processes is to say "Okay, you can fork, but your new process begins execution in a new thread, and none of the old threads survive."
New thread means new message loop. You could even do things like automatically tear down single-threaded COM apartments in the child process.