]> git.ipfire.org Git - thirdparty/pdns.git/commit
Handle waiting for a descriptor to become readable OR writable
authorRemi Gacogne <remi.gacogne@powerdns.com>
Wed, 4 Aug 2021 12:35:53 +0000 (14:35 +0200)
committerRemi Gacogne <remi.gacogne@powerdns.com>
Wed, 4 Aug 2021 12:35:53 +0000 (14:35 +0200)
commite16e673d7c277ad977a78680da5c6bc5fba5018a
tree060eb817cfc14e9dd4f3b263b48c15d0048092d2
parent4dcfada3e1b016c3ea96641c190321a7d2a38c20
Handle waiting for a descriptor to become readable OR writable

This commit refactors our multiplexers to be able to wait for a
descriptor to become readable OR writable at the same time.
I kept the two separate maps for an easier handling of the separate
TTD and to limit the amount of changes, but we might want to merge
them into a single map in the future.
The accounting is moved into the parent class instead of being dealt
with by the multiplexers themselves.

I noticed that the poll multiplexer allocates and fills a vector of
pollfd for every call to run(), which seems wasteful, but I did not
want to touch that in this commit.

I did not compile or test the kqueue, ports and /dev/poll multiplexers
yet, so don't merge this without testing them first.
.not-formatted
pdns/devpollmplexer.cc
pdns/dnsdistdist/test-dnsdisttcp_cc.cc
pdns/epollmplexer.cc
pdns/kqueuemplexer.cc
pdns/mplexer.hh
pdns/pollmplexer.cc
pdns/portsmplexer.cc
pdns/test-mplexer.cc