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

Re: Hang in pthread_cond_wait







> The only workaround I can think of is to remove the FUTEX_REQUEUE call
> from the broadcast function and always do a FUTEX_WAKE (ALL) instead.
> This might be bad for performances but will avoid such hangs.

Another fix for this problem is to hold the internal condvar lock
while calling futex_requeue. However the performance numbers for both
are about the same with the second fix (holding lock while calling requeue)
getting slightly better numbers. (I measured the time for 64 threads to
finish a given job for both fixes)

Regards,

Dinakar



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