X-Git-Url: https://git.sesse.net/?p=cubemap;a=blobdiff_plain;f=thread.h;fp=thread.h;h=26e648e5332d6a3016d0ec59d4a58b58b09033a8;hp=9c9bdc6d3ba79b49728c0398521382d6d33bb9f0;hb=76d52250fd5d7a84d9ae535fd7725d3a466bbb36;hpb=dad4769b3bf91bb45f577625c753994131df8a58 diff --git a/thread.h b/thread.h index 9c9bdc6..26e648e 100644 --- a/thread.h +++ b/thread.h @@ -22,8 +22,14 @@ protected: volatile bool should_stop; + // A pipe that you can poll on if you want to see when should_stop + // has been set to true; stop() will write a single byte to the pipe + // and then close the other end. + int stop_fd_read; + private: pthread_t worker_thread; + int stop_fd_write; }; #endif // !defined(_THREAD_H)