aboutsummaryrefslogtreecommitdiff
path: root/src/core/msgqueue.c
diff options
context:
space:
mode:
authorGarrett D'Amore <garrett@damore.org>2017-06-27 20:06:42 -0700
committerGarrett D'Amore <garrett@damore.org>2017-06-27 20:06:42 -0700
commite2d17be2a7081888aaafea150d587a7ef9517e17 (patch)
treed438d8c0e401dd70d81a003846c53568f1730e3a /src/core/msgqueue.c
parentac80ef7c3b1caa2f1fe3b093bef825363675bcb3 (diff)
downloadnng-e2d17be2a7081888aaafea150d587a7ef9517e17.tar.gz
nng-e2d17be2a7081888aaafea150d587a7ef9517e17.tar.bz2
nng-e2d17be2a7081888aaafea150d587a7ef9517e17.zip
Convert to POSIX polled I/O for async; start of cancelable aio.
This eliminates the two threads per pipe that were being used to provide basic I/O handling, replacing them with a single global thread for now, that uses poll and nonblocking I/O. This should lead to great scalability. The infrastructure is in place to easily expand to multiple polling worker threads. Some thought needs to be given about how to scale this to engage multiple CPUs. Horizontal scaling may also shorten the poll() lists easing C10K problem. We should look into better solutions than poll() for platforms that have them (epoll on Linux, kqueue on BSD, and event ports on illumos). Note that the file descriptors start out in blocking mode for now, but then are placed into non-blocking mode. This is because the negotiation phase is not yet callback driven, and so needs to be synchronous.
Diffstat (limited to 'src/core/msgqueue.c')
0 files changed, 0 insertions, 0 deletions