http://defect.opensolaris.org/bz/show_bug.cgi?id=11546



--- Comment #3 from Michael Hunter <michael.hunter at sun.com> 2009-09-29 
16:03:43 UTC ---
(In reply to comment #2)
> The cause of this bug is in the alarm(2) call.  Any timed event that's 
> enqueued
> calls alarm().  The interesting fact with alarm() is that when a new alarm() 
> is
> enqueued, the old alarm disappears.  That's what was happening.

Using alarm() (for this) is pretty gross.  Slightly better off would be to use
timer_create() and friends.  Even better would be to maintain a queue of
interesting things in the future and manipulate the argument to
pthread_cond_timedwait() so that we would wakeup the next time we needed to
evaluate that queue.

-- 
Configure bugmail: http://defect.opensolaris.org/bz/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the QA contact for the bug.

Reply via email to