summaryrefslogtreecommitdiff
path: root/ractor_core.h
diff options
context:
space:
mode:
-rw-r--r--ractor_core.h10
1 files changed, 5 insertions, 5 deletions
@@ -277,12 +277,16 @@ rb_ractor_sleeper_thread_num(rb_ractor_t *r)
}
static inline void
-rb_ractor_thread_switch(rb_ractor_t *cr, rb_thread_t *th)
{
RUBY_DEBUG_LOG("th:%d->%u%s",
cr->threads.running_ec ? (int)rb_th_serial(cr->threads.running_ec->thread_ptr) : -1,
rb_th_serial(th), cr->threads.running_ec == th->ec ? " (same)" : "");
if (cr->threads.running_ec != th->ec) {
if (0) {
ruby_debug_printf("rb_ractor_thread_switch ec:%p->%p\n",
@@ -293,10 +297,6 @@ rb_ractor_thread_switch(rb_ractor_t *cr, rb_thread_t *th)
return;
}
- if (cr->threads.running_ec != th->ec) {
- th->running_time_us = 0;
- }
-
cr->threads.running_ec = th->ec;
VM_ASSERT(cr == GET_RACTOR());