private:
struct Task
{
- unsigned tag;
+ unsigned tag = 0;
std::string host;
std::string serv;
- Family family;
- SockAddr *addr;
- std::runtime_error *error;
-
- Task();
+ Family family = UNSPEC;
+ SockAddr *addr = nullptr;
+ std::runtime_error *error = nullptr;
bool is_complete() const { return addr || error; }
};
Mutex queue_mutex;
Semaphore sem;
IO::Pipe notify_pipe;
- bool done;
+ bool done = false;
public:
WorkerThread();
IO::Pipe &get_notify_pipe() { return notify_pipe; }
private:
- virtual void main();
+ void main() override;
};
public:
sigc::signal<void, unsigned, const std::exception &> signal_resolve_failed;
private:
- IO::EventDispatcher *event_disp;
+ IO::EventDispatcher *event_disp = nullptr;
WorkerThread thread;
- unsigned next_tag;
+ unsigned next_tag = 1;
public:
Resolver();