+void AcceptorThread::stop()
+{
+ should_stop = true;
+ pthread_kill(worker_thread, SIGHUP);
+ if (pthread_join(worker_thread, NULL) == -1) {
+ perror("pthread_join");
+ exit(1);
+ }
+}
+
+void *AcceptorThread::do_work_thunk(void *arg)
+{
+ AcceptorThread *acceptor_thread = reinterpret_cast<AcceptorThread *>(arg);
+ acceptor_thread->do_work();
+ return NULL;
+}
+
+void AcceptorThread::do_work()