NIO+Multithreaded TCPSocket listener, very low cpu utilisation
ade90036
andrea.rizzini at gmail.com
Thu Nov 16 19:08:48 UTC 2017
On Thursday, 16 November 2017 at 18:44:11 UTC, Daniel Kozak wrote:
> It works for me because I have multiple threads, but when I use
> only one
> thread per pool (defaultPoolThreads(1)), it obviosly blocks,
> which is
> correct behavior
>
Ok, let me force the: "defaultPoolThreads(8)" and let me re-test
it.
By the way, if the socket is blocking you can remove all the
socketSet and the socket.select as they are not needed anymore.
like this.. https://dpaste.dzfl.pl/ca09e4c54789
More information about the Digitalmars-d-learn
mailing list