summaryrefslogtreecommitdiff
path: root/eval.c
diff options
context:
space:
mode:
Diffstat (limited to 'eval.c')
-rw-r--r--eval.c9
1 files changed, 5 insertions, 4 deletions
diff --git a/eval.c b/eval.c
index 3b579a7616..bd90b4041f 100644
--- a/eval.c
+++ b/eval.c
@@ -1440,6 +1440,8 @@ eval_node(self, node)
int ruby_in_eval;
+static int rb_thread_join _((rb_thread_t, double));
+
static void rb_thread_cleanup _((void));
static void rb_thread_wait_other_threads _((void));
@@ -7241,8 +7243,9 @@ load_lock(ftptr)
return (char *)ftptr;
}
do {
- if ((rb_thread_t)th == curr_thread) return 0;
- CHECK_INTS;
+ rb_thread_t owner = (rb_thread_t)th;
+ if (owner == curr_thread) return 0;
+ rb_thread_join(owner->thread, -1.0);
} while (st_lookup(loading_tbl, (st_data_t)ftptr, &th));
return 0;
}
@@ -11386,8 +11389,6 @@ rb_thread_select(max, read, write, except, timeout)
return curr_thread->select_value;
}
-static int rb_thread_join _((rb_thread_t, double));
-
static int
rb_thread_join(th, limit)
rb_thread_t th;