Is there a recommended way to wait for multiple inputs. For example, I want my program to be able to receive data from three sources:
Listen to the condition of the thread, for example. pthread_cond_wait ()
Take data from standard input, for example. GetLine ()
Listen to the socket, for example. accept ()
What is the best way to do this? Is a stream needed for each input source? Thanks
source
share