mirror of
https://github.com/ruby/ruby.git
synced 2022-11-09 12:17:21 -05:00
unblock thread is only for main ractor.
other ractors should not have a unblock thread.
This patch fixes 6f727853ce
.
This commit is contained in:
parent
7baedeffe9
commit
b2674c1fd7
1 changed files with 2 additions and 2 deletions
4
thread.c
4
thread.c
|
@ -1659,8 +1659,8 @@ rb_nogvl(void *(*func)(void *), void *data1,
|
||||||
ubf = ubf_select;
|
ubf = ubf_select;
|
||||||
data2 = th;
|
data2 = th;
|
||||||
}
|
}
|
||||||
else if (ubf && rb_ractor_living_thread_num(th->ractor) == 1) {
|
else if (ubf && rb_ractor_living_thread_num(th->ractor) == 1 && is_main_thread) {
|
||||||
if (is_main_thread && flags & RB_NOGVL_UBF_ASYNC_SAFE) {
|
if (flags & RB_NOGVL_UBF_ASYNC_SAFE) {
|
||||||
vm->ubf_async_safe = 1;
|
vm->ubf_async_safe = 1;
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
|
|
Loading…
Reference in a new issue