Return-Path: william@bourbon.usc.edu Delivery-Date: Fri Oct 17 06:18:46 2008 X-Spam-Checker-Version: SpamAssassin 3.2.3 (2007-08-08) on merlot.usc.edu X-Spam-Level: X-Spam-Status: No, score=-2.3 required=5.0 tests=AWL,BAYES_00 autolearn=ham version=3.2.3 Received: from bourbon.usc.edu (bourbon.usc.edu [128.125.9.75]) by merlot.usc.edu (8.14.1/8.14.1) with ESMTP id m9HDIkgh029768 for ; Fri, 17 Oct 2008 06:18:46 -0700 Received: from bourbon.usc.edu (localhost.localdomain [127.0.0.1]) by bourbon.usc.edu (8.14.2/8.14.1) with ESMTP id m9HDRDOS014258 for ; Fri, 17 Oct 2008 06:27:13 -0700 Message-Id: <200810171327.m9HDRDOS014258@bourbon.usc.edu> To: cs551@merlot.usc.edu Subject: Re: CS551: Final Project : Lost Signal Date: Fri, 17 Oct 2008 06:27:13 -0700 From: Bill Cheng Someone wrote: > When we have multiple threads waiting on different condition variables or a > single thread waiting on a condition variable, sometimes the signal is not > received at all by the waiting thread and hence the thread gets stuck at the > wait. > is there any way in which we can handle this ? I assume you are using pthread_cond_broadcast(). I cannot think of a reason why you would lose a signal if that's the case! Then it must be a programming bug, i.e., one of your thread is not suppose to wait on this condition when it did. -- Bill Cheng // bill.cheng@usc.edu