Otherwise the new thread might start running and access
uninitialized members like d_pipe or d_work.
On my host, running dnsdist in gdb without this modification
results in a SIGSEGV at delaypipe.cc:141.
void submit(T& t, int msec); //!< don't try for more than 4294 msec
private:
- std::thread d_thread;
void worker();
struct Combo
{
};
std::multimap<struct timespec, T, tscomp> d_work;
void gettime(struct timespec* ts);
+ std::thread d_thread;
};
#include "delaypipe.cc"