Subj : Re: Socket programmation with threads To : comp.programming.threads From : Joe Seigh Date : Tue May 24 2005 02:24 pm On 24 May 2005 09:21:00 -0700, Jomu wrote: > So, worst would be simple sem_wait, pthread_cond_wait next, and "best" > this approach above? > sem_wait and pthread_cond_wait are probably about the same if used similarly. If you have single producer / single consumer then you could optimize somewhat by buffering and only signaling if there are waiters. The "best" approach isn't necessarily the best approach, just one that illustrates the problem. -- Joe Seigh When you get lemons, you make lemonade. When you get hardware, you make software. .