aboutsummaryrefslogtreecommitdiffstats
path: root/thread_win32.c
diff options
context:
space:
mode:
Diffstat (limited to 'thread_win32.c')
-rw-r--r--thread_win32.c10
1 files changed, 3 insertions, 7 deletions
diff --git a/thread_win32.c b/thread_win32.c
index 9b80bfc1f8..132e52cae3 100644
--- a/thread_win32.c
+++ b/thread_win32.c
@@ -710,13 +710,9 @@ timer_thread_func(void *dummy)
rb_vm_t *vm = GET_VM();
thread_debug("timer_thread\n");
rb_w32_set_thread_description(GetCurrentThread(), L"ruby-timer-thread");
- while (WaitForSingleObject(timer_thread.lock, TIME_QUANTUM_USEC/1000) ==
- WAIT_TIMEOUT) {
- rb_execution_context_t *running_ec = vm->ractor.main_ractor->threads.running_ec;
-
- if (running_ec) {
- timer_thread_function(running_ec);
- }
+ while (WaitForSingleObject(timer_thread.lock,
+ TIME_QUANTUM_USEC/1000) == WAIT_TIMEOUT) {
+ vm->clock++;
ruby_sigchld_handler(vm); /* probably no-op */
rb_threadptr_check_signal(vm->ractor.main_thread);
}