I have a thread A that calls poll() in a loop. This thread is responsible for IO on incoming and outgoing connections. However, when thread B has opened an outgoing connection, it has to give it to A somehow. Do you think it’d be a good idea to have a pipe between threads A (reading side) and B (writing side) that B writes to after opening the socket?
I have a thread A that calls poll() in a loop. This thread is
Share
That sounds reasonable.
pollshould be happy watching a pipe alongside your socket(s).