summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--thread_pthread.c32
-rw-r--r--version.h4
2 files changed, 22 insertions, 14 deletions
diff --git a/thread_pthread.c b/thread_pthread.c
index d8d3184c62..96d2ca9cb3 100644
--- a/thread_pthread.c
+++ b/thread_pthread.c
@@ -2182,25 +2182,33 @@ timer_pthread_fn(void *p)
pthread_t main_thread_id = vm->main_thread->thread_id;
struct pollfd pfd;
int timeout = -1;
+ int ccp;
pfd.fd = timer_pthread.low[0];
pfd.events = POLLIN;
while (system_working > 0) {
(void)poll(&pfd, 1, timeout);
- (void)consume_communication_pipe(pfd.fd);
+ ccp = consume_communication_pipe(pfd.fd);
- if (system_working > 0 && ATOMIC_CAS(timer_pthread.armed, 1, 1)) {
- pthread_kill(main_thread_id, SIGVTALRM);
-
- if (rb_signal_buff_size() || !ubf_threads_empty()) {
- timeout = TIME_QUANTUM_MSEC;
- }
- else {
- ATOMIC_SET(timer_pthread.armed, 0);
- timeout = -1;
- }
- }
+ if (system_working > 0) {
+ if (ATOMIC_CAS(timer_pthread.armed, 1, 1)) {
+ pthread_kill(main_thread_id, SIGVTALRM);
+
+ if (rb_signal_buff_size() || !ubf_threads_empty()) {
+ timeout = TIME_QUANTUM_MSEC;
+ }
+ else {
+ ATOMIC_SET(timer_pthread.armed, 0);
+ timeout = -1;
+ }
+ }
+ else if (ccp) {
+ pthread_kill(main_thread_id, SIGVTALRM);
+ ATOMIC_SET(timer_pthread.armed, 0);
+ timeout = -1;
+ }
+ }
}
return 0;
diff --git a/version.h b/version.h
index e31a2834d7..b81f9d7aa0 100644
--- a/version.h
+++ b/version.h
@@ -1,10 +1,10 @@
#define RUBY_VERSION "2.6.3"
#define RUBY_RELEASE_DATE RUBY_RELEASE_YEAR_STR"-"RUBY_RELEASE_MONTH_STR"-"RUBY_RELEASE_DAY_STR
-#define RUBY_PATCHLEVEL 75
+#define RUBY_PATCHLEVEL 76
#define RUBY_RELEASE_YEAR 2019
#define RUBY_RELEASE_MONTH 8
-#define RUBY_RELEASE_DAY 1
+#define RUBY_RELEASE_DAY 3
#include "ruby/version.h"