diff options
-rw-r--r-- | thread.c | 8 | ||||
-rw-r--r-- | thread_win32.c | 1 |
2 files changed, 9 insertions, 0 deletions
@@ -4269,6 +4269,14 @@ consume_communication_pipe(int fd) ssize_t result; int ret = FALSE; /* for rb_sigwait_sleep */ + /* + * disarm UBF_TIMER before we read, because it can become + * re-armed at any time via sighandler and the pipe will refill + * We can disarm it because this thread is now processing signals + * and we do not want unnecessary SIGVTALRM + */ + ubf_timer_disarm(); + while (1) { result = read(fd, buff, sizeof(buff)); if (result > 0) { diff --git a/thread_win32.c b/thread_win32.c index 6db1f25fa7..6e9f18f458 100644 --- a/thread_win32.c +++ b/thread_win32.c @@ -22,6 +22,7 @@ #define unregister_ubf_list(th) #define ubf_wakeup_all_threads() do {} while (0) #define ubf_threads_empty() (1) +#define ubf_timer_disarm() do {} while (0) static volatile DWORD ruby_native_thread_key = TLS_OUT_OF_INDEXES; |