diff options
author | das <das> | 2006-08-21 01:08:09 (GMT) |
---|---|---|
committer | das <das> | 2006-08-21 01:08:09 (GMT) |
commit | 56574b4e03aa9dfcdd5a8886bfa4474879b6b956 (patch) | |
tree | 944a1205d51ac2cbc599ade273e50e17fa5d7372 /unix | |
parent | c925813266e101493b3ca5049dbb21f4c1764d8b (diff) | |
download | tcl-56574b4e03aa9dfcdd5a8886bfa4474879b6b956.zip tcl-56574b4e03aa9dfcdd5a8886bfa4474879b6b956.tar.gz tcl-56574b4e03aa9dfcdd5a8886bfa4474879b6b956.tar.bz2 |
* macosx/tclMacOSXNotify.c (Tcl_WaitForEvent): if the run loop is
already running (e.g. if Tcl_WaitForEvent was called recursively),
re-run it in a custom run loop mode containing only the source for the
notifier thread, otherwise wakeups from other sources added to the
common run loop modes might get lost; sync panic msg changes from HEAD.
* unix/tclUnixNotfy.c (Tcl_WaitForEvent): on 64-bit Darwin,
pthread_cond_timedwait() appears to have a bug that causes it to wait
forever when passed an absolute time which has already been exceeded by
the system time; as a workaround, when given a very brief timeout, just
do a poll on that platform. [Bug 1457797]
Diffstat (limited to 'unix')
-rw-r--r-- | unix/tclUnixNotfy.c | 12 |
1 files changed, 11 insertions, 1 deletions
diff --git a/unix/tclUnixNotfy.c b/unix/tclUnixNotfy.c index 7488cf1..118fa79 100644 --- a/unix/tclUnixNotfy.c +++ b/unix/tclUnixNotfy.c @@ -11,7 +11,7 @@ * See the file "license.terms" for information on usage and redistribution * of this file, and for a DISCLAIMER OF ALL WARRANTIES. * - * RCS: @(#) $Id: tclUnixNotfy.c,v 1.11.2.14 2005/11/27 02:34:42 das Exp $ + * RCS: @(#) $Id: tclUnixNotfy.c,v 1.11.2.15 2006/08/21 01:08:10 das Exp $ */ #include "tclInt.h" @@ -715,6 +715,16 @@ Tcl_WaitForEvent(timePtr) waitForFiles = (tsdPtr->numFdBits > 0); if (timePtr != NULL && timePtr->sec == 0 && timePtr->usec == 0) { +#if defined(__APPLE__) && defined(__LP64__) + /* + * On 64-bit Darwin, pthread_cond_timedwait() appears to have a bug + * that causes it to wait forever when passed an absolute time which + * has already been exceeded by the system time; as a workaround, + * when given a very brief timeout, just do a poll. [Bug 1457797] + */ + || timePtr->usec < 10 +#endif + )) { /* * Cannot emulate a polling select with a polling condition variable. * Instead, pretend to wait for files and tell the notifier |