Question about threading implementation

Jonathon McKitrick jcm at FreeBSD-uk.eu.org
Mon Mar 7 04:31:21 PST 2005


On Mon, Mar 07, 2005 at 11:43:53AM +1000, Andrew Hacking wrote:
: Calling sleep() in a multi-threaded program is probably not safe since
: it suspends the process, not just the thread.
: You should always call nanosleep() in multi-threaded apps.

Are you sure nanosleep() doesn't suspend the process?

: The core dump is not pretty through....

I found the problem.

Not only does the library with the threads need to be linked against
-pthread or -lthread_xu, but the main app does as well.


Jonathon McKitrick
--
My other computer is your Windows box.





More information about the Users mailing list