There's no need to use an extra thread for this, since there's no concern of a socket getting stuck in a blocking read. This is one less thing that can go wrong because of pthreads.