4 ms·
fork is not friendly to concurrent programming: fibers/threads/callbacks - what should you do with all this after fork? While it is possible to create and mana
by funny_falcon 7y ago
fork is not friendly to concurrent programming: fibers/threads/callbacks - what should you do with all this after fork?
While it is possible to create and manage some rules, it is simpler not to fork at all.
- pjc50 7y agoYes. Fork was a clever hack for one point in time, back when processes were simple, single-threaded, and lightweight. It's always had the misfeature of inheriting resources which you didn't ask for. Not including it makes it mildly annoying to port existing programs, but 99% of the time programmers want spawn and are forced to build it from fork(), not the other way round.