From 34baca5f333f79433ba8be3ac93c47daed4497a5 Mon Sep 17 00:00:00 2001 From: Giuseppe Scrivano Date: Wed, 16 Sep 2009 13:23:35 +0200 Subject: [PATCH] Check for `other_threads_p ()' in the inner loop too because this condition can change since the initial check. --- src/buffer.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/buffer.c b/src/buffer.c index b20d0c42b6a..feacbfcc38a 100644 --- a/src/buffer.c +++ b/src/buffer.c @@ -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); -- 2.39.5