Re:Wangle – an asynchronous C++ networking and RPC library
by pcwalton on Wednesday April 20, 2016 @04:14PM
(#11537380)
> Yes. In fact, under Linux oftentimes spawning a thread and then running a system call can be faster than just running a system call.
Interesting, do you have any further info (references, cites) on this?
Yes. In fact, under Linux oftentimes spawning a thread and then running a system call can be faster than just running a system call.
> Conventional C++ wisdom advices against it.
With 32 bit CPU's you might run out of virtual memory quickly, since each thread allocates virtual memory for its stack.
With 64 bit CPU's there are no issues. (Also never forget that virtual memory isn't real memory, it's just a page counter.)