Is there a recommended way to wait on multiple inputs. For example I would like my program to be able to receive input from 3 sources:
Listen on a thread condition e.g.
On modern Linux the best way to do this is not to use pthread_cond_wait at all. Just use eventfd instead, which will enable you to listen for multiple events using select/poll/epoll.
pthread_cond_wait