X-Git-Url: https://git.sesse.net/?p=cubemap;a=blobdiff_plain;f=stats.cpp;h=1ae23e9891a4000f8b75dd66da87c2f080120c25;hp=445bae7f3317d8e31bfecaa4a8143d873fb9c367;hb=e1722a5c0341fd541ce57f1eed4dc76cbd3efe07;hpb=99738bd173040bf4e2d2d42ffc8c7ab8c105cf75 diff --git a/stats.cpp b/stats.cpp index 445bae7..1ae23e9 100644 --- a/stats.cpp +++ b/stats.cpp @@ -18,29 +18,6 @@ StatsThread::StatsThread(const std::string &stats_file, int stats_interval) { } -void StatsThread::run() -{ - should_stop = false; - pthread_create(&worker_thread, NULL, do_work_thunk, this); -} - -void StatsThread::stop() -{ - should_stop = true; - pthread_kill(worker_thread, SIGHUP); - if (pthread_join(worker_thread, NULL) == -1) { - perror("pthread_join"); - exit(1); - } -} - -void *StatsThread::do_work_thunk(void *arg) -{ - StatsThread *stats_thread = reinterpret_cast(arg); - stats_thread->do_work(); - return NULL; -} - void StatsThread::do_work() { while (!should_stop) {