3 ms·
Forking and threading are different things. Forking creates new processes and duplicates memory. It raises entirely different issues from multi-threading, which
by slavik81 11y ago
Forking and threading are different things. Forking creates new processes and duplicates memory. It raises entirely different issues from multi-threading, which does neither. See: http://stackoverflow.com/q/2483041/331041 http://stackoverflow.com/q/2483041/331041
They discussed forking, but did not discuss multi-threading.
- brazzledazzle 11y agoSo for OpenSSL's RNG vs. the operating system's CSPRNG is there a difference between forking and multi-threading?
- slavik81 11y agoYes. The problem with an in-process RNG and forking is that the RNG state is duplicated, so both processes get the same sequence of numbers. Multithreading just needs locking to prevent corruption because the state is shared.
- brazzledazzle 11y agoThanks for taking the time to explain.