thread.c (call_without_gvl): spawn thread for UBF iff single-threaded

We need another native thread to call some unblocking functions
which aren't RUBY_UBF_IO or RUBY_UBF_PROCESS.  Instead of a
permanent thread in <= 2.5, we can now rely on the thread cache
feature to perform interrupts.

[ruby-core:90865] [Bug #15499]

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@66708 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
This commit is contained in:
normal 2019-01-04 12:53:06 +00:00
parent 79aef1272e
commit 9e66910b3b
3 changed files with 33 additions and 0 deletions

View file

@ -708,6 +708,12 @@ rb_thread_wakeup_timer_thread(int sig)
/* do nothing */
}
static VALUE
rb_thread_start_unblock_thread(void)
{
return Qfalse; /* no-op */
}
static void
rb_thread_create_timer_thread(void)
{