summaryrefslogtreecommitdiff
path: root/thread.c
diff options
context:
space:
mode:
authorKoichi Sasada <ko1@atdot.net>2021-02-05 15:30:53 +0900
committerKoichi Sasada <ko1@atdot.net>2021-02-05 15:33:00 +0900
commitb2674c1fd725b43adf51af7935c780359d70c2a4 (patch)
treebf6f74bfa6a63120472fddae8057900f9e4dc071 /thread.c
parent7baedeffe93dbb03c2e69129c3100596c1ff0e71 (diff)
unblock thread is only for main ractor.
other ractors should not have a unblock thread. This patch fixes 6f727853cee41195b67ee5d793c1ac23fe1a6ae0.
Diffstat (limited to 'thread.c')
-rw-r--r--thread.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/thread.c b/thread.c
index f1d8c9ae27..e3689487ce 100644
--- a/thread.c
+++ b/thread.c
@@ -1659,8 +1659,8 @@ rb_nogvl(void *(*func)(void *), void *data1,
ubf = ubf_select;
data2 = th;
}
- else if (ubf && rb_ractor_living_thread_num(th->ractor) == 1) {
- if (is_main_thread && flags & RB_NOGVL_UBF_ASYNC_SAFE) {
+ else if (ubf && rb_ractor_living_thread_num(th->ractor) == 1 && is_main_thread) {
+ if (flags & RB_NOGVL_UBF_ASYNC_SAFE) {
vm->ubf_async_safe = 1;
}
else {