DragonFly BSD
DragonFly users List (threaded) for 2005-03
[Date Prev][Date Next]  [Thread Prev][Thread Next]  [Date Index][Thread Index]

Re: Question about threading implementation


From: Jonathon McKitrick <jcm@xxxxxxxxxxxxxxxxx>
Date: Mon, 7 Mar 2005 12:24:19 +0000

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.



[Date Prev][Date Next]  [Thread Prev][Thread Next]  [Date Index][Thread Index]