diff options
-rw-r--r-- | cont.c | 10 | ||||
-rw-r--r-- | version.h | 2 |
2 files changed, 11 insertions, 1 deletions
@@ -240,7 +240,17 @@ static inline void ec_switch(rb_thread_t *th, rb_fiber_t *fib) { rb_execution_context_t *ec = &fib->cont.saved_ec; + ruby_current_execution_context_ptr = th->ec = ec; + + /* + * timer-thread may set trap interrupt on previous th->ec at any time; + * ensure we do not delay (or lose) the trap interrupt handling. + */ + if (th->vm->main_thread == th && rb_signal_buff_size() > 0) { + RUBY_VM_SET_TRAP_INTERRUPT(ec); + } + VM_ASSERT(ec->fiber_ptr->cont.self == 0 || ec->vm_stack != NULL); } @@ -1,6 +1,6 @@ #define RUBY_VERSION "2.5.2" #define RUBY_RELEASE_DATE "2018-10-11" -#define RUBY_PATCHLEVEL 99 +#define RUBY_PATCHLEVEL 100 #define RUBY_RELEASE_YEAR 2018 #define RUBY_RELEASE_MONTH 10 |