diff options
author | Daniel Baumann <daniel.baumann@progress-linux.org> | 2024-04-13 21:14:49 +0000 |
---|---|---|
committer | Daniel Baumann <daniel.baumann@progress-linux.org> | 2024-04-13 21:14:49 +0000 |
commit | 2f230033794fafdf10822568e763d4db68cf6c6b (patch) | |
tree | 39ca5c2325b7b43c9a28ca6d4ad4026a61e7eb97 /delaypipe.hh | |
parent | Adding debian version 1.8.3-3. (diff) | |
download | dnsdist-2f230033794fafdf10822568e763d4db68cf6c6b.tar.xz dnsdist-2f230033794fafdf10822568e763d4db68cf6c6b.zip |
Merging upstream version 1.9.3.
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
Diffstat (limited to 'delaypipe.hh')
-rw-r--r-- | delaypipe.hh | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/delaypipe.hh b/delaypipe.hh index ad1626a..b12fd50 100644 --- a/delaypipe.hh +++ b/delaypipe.hh @@ -20,10 +20,11 @@ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. */ #pragma once -#include <map> #include <time.h> #include <thread> +#include "channel.hh" + /** General idea: many threads submit work to this class, but only one executes it. The work should therefore be entirely trivial. The implementation is that submitter threads create an object that represents the work, and it gets sent over a pipe @@ -41,12 +42,12 @@ class ObjectPipe { public: ObjectPipe(); - ~ObjectPipe(); void write(T& t); int readTimeout(T* t, double msec); //!< -1 is timeout, 0 is no data, 1 is data. msec<0 waits infinitely long. msec==0 = undefined void close(); private: - int d_fds[2]; + pdns::channel::Sender<T> d_sender; + pdns::channel::Receiver<T> d_receiver; }; template<class T> |