summaryrefslogtreecommitdiff
path: root/thread.c
diff options
context:
space:
mode:
Diffstat (limited to 'thread.c')
-rw-r--r--thread.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/thread.c b/thread.c
index 5fd2033f08..ae0c3b3bfb 100644
--- a/thread.c
+++ b/thread.c
@@ -2555,6 +2555,9 @@ rb_barrier_wait(VALUE self)
if (thlist_signal(&barrier->waiting, 1, &barrier->owner)) return Qfalse;
return Qtrue;
}
+ else if (barrier->owner == GET_THREAD()) {
+ return Qfalse;
+ }
else {
*barrier->tail = q = ALLOC(rb_thread_list_t);
q->th = GET_THREAD();