2 ms·
#1 is not equivalent to being single threaded (every go program is multithreaded), it just means there only 1 thread for user goroutines. Every call to wait wil
by ominous_prime 11y ago
#1 is not equivalent to being single threaded (every go program is multithreaded), it just means there only 1 thread for user goroutines. Every call to wait will block and spawn a new thread. If you force it to stay on the same thread, you block the runtime, and your entire program.
An init system has to call wait, that's one of its primary tasks, especially on orphaned processes it inherits.