summaryrefslogtreecommitdiff
path: root/thread.c
diff options
context:
space:
mode:
authornormal <normal@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2018-08-16 09:16:11 +0000
committernormal <normal@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2018-08-16 09:16:11 +0000
commite3f6429effd6d63d106d72eb757c78a4cdab2e4a (patch)
treeda9db36691986d35c8b3423ab00df8fbf742d481 /thread.c
parent3872ea814c0cacbf12bd14cb478f682328862e4a (diff)
thread.c (consume_communication_pipe): disarm UBF_TIMER before consume
Same reasoning as the disarm in rb_sigwait_fd_get, the current thread is already processing signals, so we do not need UBF_TIMER to continually kick the process, anymore. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@64390 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'thread.c')
-rw-r--r--thread.c8
1 files changed, 8 insertions, 0 deletions
diff --git a/thread.c b/thread.c
index 90cb1c2..23a4ebf 100644
--- a/thread.c
+++ b/thread.c
@@ -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) {