delorie.com/archives/browse.cgi | search |
Mailing-List: | contact cygwin-help AT cygwin DOT com; run by ezmlm |
List-Subscribe: | <mailto:cygwin-subscribe AT cygwin DOT com> |
List-Archive: | <http://sources.redhat.com/ml/cygwin/> |
List-Post: | <mailto:cygwin AT cygwin DOT com> |
List-Help: | <mailto:cygwin-help AT cygwin DOT com>, <http://sources.redhat.com/ml/#faqs> |
Sender: | cygwin-owner AT cygwin DOT com |
Mail-Followup-To: | cygwin AT cygwin DOT com |
Delivered-To: | mailing list cygwin AT cygwin DOT com |
From: | Michael Labhard <ince AT pacifier DOT com> |
To: | cygwin AT cygwin DOT com |
Subject: | Re: pthread_cond_wait does not relock mutex on release |
Date: | Wed, 17 Apr 2002 20:50:34 +0800 |
MIME-Version: | 1.0 |
Message-Id: | <02041720503405.01295@wrybread.labhard.com> |
Note-from-DJ: | This may be spam |
Robert and Gerald: Both quite right. Although adding the SAFE_PRINTF made no difference in the output, checking a condition value in a loop made all the difference. Putting a printf in the loop revealed to my surprise that "spurious wakeups" were occurring thousands of times per second. I had naively assumed that a condition would stay set until signalled. Now I'm led to wonder if a condition variable is any performance improvement over a simple loop and short sleep. Any thoughts? Thanks very much for your time and effort. It was a great help. -- Michael -- Unsubscribe info: http://cygwin.com/ml/#unsubscribe-simple Bug reporting: http://cygwin.com/bugs.html Documentation: http://cygwin.com/docs.html FAQ: http://cygwin.com/faq/
webmaster | delorie software privacy |
Copyright © 2019 by DJ Delorie | Updated Jul 2019 |