Blocking on multiple threads with timeout
jcm at FreeBSD-uk.eu.org
Sun Feb 27 19:08:44 GMT 2005
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
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. :-)
My other computer is your Windows box.
More information about the freebsd-questions