servers->run();
- pthread_t acceptor_thread;
- pthread_create(&acceptor_thread, NULL, acceptor_thread_run, reinterpret_cast<void *>(server_sock));
+ AcceptorThread acceptor_thread(server_sock);
+ acceptor_thread.run();
// Find all streams in the configuration file, and create inputs for them.
vector<Input *> inputs;
inputs.push_back(input);
}
+ // All deserialized inputs should now have been taken care of, one way or the other.
+ assert(deserialized_inputs.empty());
+
if (is_reexec) {
// Put back the existing clients. It doesn't matter which server we
// allocate them to, so just do round-robin. However, we need to add
}
}
- // All deserialized inputs should now have been taken care of, one way or the other.
- assert(deserialized_inputs.empty());
-
// Start writing statistics.
if (stats_thread != NULL) {
stats_thread->run();
if (stats_thread != NULL) {
stats_thread->stop();
}
- pthread_kill(acceptor_thread, SIGHUP);
- if (pthread_join(acceptor_thread, NULL) == -1) {
- perror("pthread_join");
- exit(1);
- }
+ acceptor_thread.stop();
CubemapStateProto state;
state.set_serialize_start_sec(serialize_start.tv_sec);