From fe2f89af9ad6bd87ec91b7042593bc8c7247708b Mon Sep 17 00:00:00 2001 From: normal Date: Sat, 18 Aug 2018 09:07:36 +0000 Subject: thread.c (sleep_*): reduce the effect of spurious interrupts Spurious interrupts from SIGCHLD cause Mutex#sleep (via ConditionVariable#wait) to return early and breaks some use cases. Since these are outside the programs's control with MJIT, we will only consider pending interrupts (e.g. those from Thread#run) and signals which cause a Ruby-level Signal.trap handler to fire as "spurious" wakeups. [ruby-core:88537] [Feature #15002] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@64444 b2dd03c8-39d4-4d8f-98ff-823fe69b080e --- vm_core.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'vm_core.h') diff --git a/vm_core.h b/vm_core.h index 38a5775220..b936b0352b 100644 --- a/vm_core.h +++ b/vm_core.h @@ -1736,11 +1736,11 @@ enum { VALUE rb_exc_set_backtrace(VALUE exc, VALUE bt); int rb_signal_buff_size(void); -void rb_signal_exec(rb_thread_t *th, int sig); +int rb_signal_exec(rb_thread_t *th, int sig); void rb_threadptr_check_signal(rb_thread_t *mth); void rb_threadptr_signal_raise(rb_thread_t *th, int sig); void rb_threadptr_signal_exit(rb_thread_t *th); -void rb_threadptr_execute_interrupts(rb_thread_t *, int); +int rb_threadptr_execute_interrupts(rb_thread_t *, int); void rb_threadptr_interrupt(rb_thread_t *th); void rb_threadptr_unlock_all_locking_mutexes(rb_thread_t *th); void rb_threadptr_pending_interrupt_clear(rb_thread_t *th); -- cgit v1.2.3