Identify UDPInput error messages by the stream, too.
[cubemap] / thread.h
index 9c9bdc6..26e648e 100644 (file)
--- 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)