I have two threads in my program, which runs on Solaris 8 SPARC with Sun Studio
11. I would like the thread containing main() to spawn a new thread to perform
a complicated task for up to five minutes, but kill it if it takes too long.
I've been trying to accomplish this with a pthread_cond_timedwait, but it seems
that this function can sometimes return ETIMEDOUT after nowhere near the
correct amount of time has elapsed. A post at
http://dbforums.com/showthread.php?t=769084 suggests that this might be caused
by an hourly NTP synchronization changing the system clock time and
invalidating the waiting timer. Is there any good way to work around this
issue, or to handle a thread timing out more intelligently?
This message posted from opensolaris.org
_______________________________________________
opensolaris-code mailing list
[email protected]
http://mail.opensolaris.org/mailman/listinfo/opensolaris-code