diff options
-rw-r--r-- | internal/thread.h | 2 | ||||
-rw-r--r-- | ractor.c | 4 | ||||
-rw-r--r-- | thread.c | 8 |
3 files changed, 11 insertions, 3 deletions
@@ -66,6 +66,8 @@ struct rb_io_close_wait_list { int rb_notify_fd_close(int fd, struct rb_io_close_wait_list *busy); void rb_notify_fd_close_wait(struct rb_io_close_wait_list *busy); RUBY_SYMBOL_EXPORT_BEGIN void *rb_thread_prevent_fork(void *(*func)(void *), void *data); /* for ext/socket/raddrinfo.c */ @@ -602,7 +602,7 @@ ractor_check_ints(rb_execution_context_t *ec, rb_ractor_t *cr, ractor_sleep_clea enum ruby_tag_type state; EC_PUSH_TAG(ec); if ((state = EC_EXEC_TAG()) == TAG_NONE) { - rb_thread_check_ints(); } EC_POP_TAG(); @@ -612,7 +612,7 @@ ractor_check_ints(rb_execution_context_t *ec, rb_ractor_t *cr, ractor_sleep_clea } } else { - rb_thread_check_ints(); } } @@ -1416,6 +1416,12 @@ rb_thread_wait_for(struct timeval time) sleep_hrtime(th, rb_timeval2hrtime(&time), SLEEP_SPURIOUS_CHECK); } /* * CAUTION: This function causes thread switching. * rb_thread_check_ints() check ruby's interrupts. @@ -1426,7 +1432,7 @@ rb_thread_wait_for(struct timeval time) void rb_thread_check_ints(void) { - RUBY_VM_CHECK_INTS_BLOCKING(GET_EC()); } /* |