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. pthread_cond_wait()
Take data from Standard input e.g. getline()
Listen on a socket e.g. accept()
What is the best way to accomplish this? Do I need a thread for each different input source? Thanks