]> git.eshelyaron.com Git - emacs.git/commitdiff
Check for `other_threads_p ()' in the inner loop too because this condition can chang...
authorGiuseppe Scrivano <gscrivano@gnu.org>
Wed, 16 Sep 2009 11:23:35 +0000 (13:23 +0200)
committerGiuseppe Scrivano <gscrivano@gnu.org>
Wed, 16 Sep 2009 11:23:35 +0000 (13:23 +0200)
src/buffer.c

index b20d0c42b6a387ce247daf6999ca4bf836cdbc53..feacbfcc38a96c70da429fb445e4605e83e819a5 100644 (file)
@@ -1876,7 +1876,8 @@ acquire_buffer (char *end, void *nb)
       pthread_cond_broadcast (&buffer_cond);
 
       /* If our desired buffer is locked, wait for it.  */
-      while (!EQ (new_buffer->owner, Qnil)
+      while (other_threads_p ()
+            && !EQ (new_buffer->owner, Qnil)
             /* We set the owner to Qt to mean it is being killed.  */
             && !EQ (new_buffer->owner, Qt))
        pthread_cond_wait (&buffer_cond, &global_lock);