|
|
|
|
|
by the_mitsuhiko
1330 days ago
|
|
> That is kinda insane thing to say. That is like trying to claim that you can't do threads in C++ because you can fork. If you have more than one thread the only thing you are allowed to call after fork() are async safe functions and only the calling thread will make it into the forked process. Go uses a multi threaded runtime so the state of the runtime will be in an absolute mess in the child process. There generally is no sensible way in which an application can fork after a second thread has been created and how bad this gets, depends very much on the situation. But yes, the same problem applies in any programming language after multiple threads were created. |
|