Given the amount of work you do, this probably doesn't matter.
For high-performance applications, there is a difference. In these cases, you need to process several thousand connections at the same time; in such cases, you transfer new connections to new streams.
Creating several thousand threads is expensive, so the choice is used to increase efficiency. In fact, different methods are used for optimal switching, such as kqueue or epoll .
I say that this does not matter, because you are probably only going to create a thread once and have exactly two threads working for the lifetime of the application.
user257111
source share