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

Blocking on multiple threads with timeout


From: Jonathon McKitrick <jcm@xxxxxxxxxxxxxxxxx>
Date: Sun, 27 Feb 2005 19:04:46 +0000

I have a few threads that might need as long as a minute or more to
complete and terminate.  If they exceed an arbitrary time, they can be
canceled.

In Win32, there is a 'wait on multiple objects' call.  I'm not sure if it
blocks or spins, but it *does* take a timeout argument.

Is there a similar way with pthreads that I can use that will kill the
threads after a certain time, but without spinlocking?  After a minute of
spinning, my laptop fan kicks on, and I'd like to be a bit more reasonable
about my CPU cycle demands. :-)

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



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