Page 1 of 1

Does select() lock a thread?

Posted: Mon May 25, 2009 2:53 pm
by rodrigod
I am writing a multi-thread application that each thread watches over a serial communication device. I want to know that if you do a select() to wait until the we receive something from the device or the timeout expires does it lock the whole application while waiting or does it lock only the thread.

If it locks the whole application, what could I use to make it work like a mutex or condition?

Thanks

Posted: Mon May 25, 2009 6:21 pm
by Frank
It only blocks the calling thread.