|
From: Christian G. <aur...@gm...> - 2016-11-28 07:03:20
|
Am 28.11.16 um 03:01 schrieb Alexandre Ferrieux: > On Mon, Nov 28, 2016 at 2:12 AM, Lucio Andrés Illanes Albornoz > <l.i...@gm...> wrote: >> >> Can't you use the same model of using a trigger pipe to do the inter-thread notification, but with each thread having its own trigger pipe? That is, when the trigger pipe is written to, the select/poll/epoll/kqueue wakes up, and can then check the condition variable. As was suggested earlier, it means an extra 2 fds per thread, but that's much less of an issue since you're not limited to 1024 fds. > > Well, C10k means FD20k then. Still doable ... I think that's not correct. For C10k you wouldn't start 10k threads, but 10k coroutines (or simply use the callback interface). AFAIUI one should run only a small number of threads to fetch the data from the disk (which can't be done asynchronously, at least not with the usual open), and one coroutine per connection: https://strongloop.com/strongblog/node-js-is-faster-than-java/ Christian |