30 Aug
2007
30 Aug
'07
6:12 p.m.
David Daeschler wrote:
This probably doesn't help much, but we ran into the same problem when using pthreads directly. One thread ran while another completely starved. The only solution we found was to include a call to pthread_yield after pthread_mutex_unlock in our ReleaseMutex routine. This fixed the starvation and didn't have a huge impact on performance.
Does someone understand the rationale for this implementation? Thanks, Sohail