Threaded application sleeps with other application

Posted by DeeD on Stack Overflow See other posts from Stack Overflow or by DeeD
Published on 2010-04-28T17:08:01Z Indexed on 2010/04/28 17:13 UTC
Read the original article Hit count: 179

Filed under:

I have a weird problem with my threaded software.

I start 2 instances of the software. Each instance has 2 threads, one thread creates a socket to use, and the other one is uses the socket for communication.

When one of the threads in one instance calls sleep(3), the other threads in the the other instance sleeps too. And the weirdest thing is that when I rebooted the computer, it works the first time, but after trying a second time, it sleeps like described.

How is this possible? Is it using some shared resource?

© Stack Overflow or respective owner

Related posts about pthreads