aboutsummaryrefslogtreecommitdiffstats
path: root/thread.c
diff options
context:
space:
mode:
Diffstat (limited to 'thread.c')
-rw-r--r--thread.c6
1 files changed, 6 insertions, 0 deletions
diff --git a/thread.c b/thread.c
index 7383a886f6..a63c9528de 100644
--- a/thread.c
+++ b/thread.c
@@ -1273,6 +1273,7 @@ static void
rb_threadptr_execute_interrupts_common(rb_thread_t *th)
{
rb_atomic_t interrupt;
+ int first_p = TRUE;
if (th->raised_flag) return;
@@ -1282,6 +1283,11 @@ rb_threadptr_execute_interrupts_common(rb_thread_t *th)
int finalizer_interrupt = interrupt & 0x04;
int sig;
+ if (first_p)
+ first_p = FALSE;
+ else if (interrupt == 0x01)
+ break;
+
th->status = THREAD_RUNNABLE;
/* signal handling */