mirror of
https://github.com/ruby/ruby.git
synced 2025-08-15 13:39:04 +02:00
Force reset running time in timer interrupt
Co-authored-by: Ivo Anjo <ivo.anjo@datadoghq.com> Co-authored-by: Luke Gruber <luke.gru@gmail.com>
This commit is contained in:
parent
55c9c75b47
commit
d845da05e8
Notes:
git
2025-05-15 21:44:39 +00:00
3 changed files with 9 additions and 9 deletions
6
thread.c
6
thread.c
|
@ -173,7 +173,7 @@ static inline void blocking_region_end(rb_thread_t *th, struct rb_blocking_regio
|
|||
|
||||
#define THREAD_BLOCKING_END(th) \
|
||||
thread_sched_to_running((sched), (th)); \
|
||||
rb_ractor_thread_switch(th->ractor, th); \
|
||||
rb_ractor_thread_switch(th->ractor, th, false); \
|
||||
} while(0)
|
||||
|
||||
#ifdef __GNUC__
|
||||
|
@ -1470,7 +1470,7 @@ rb_thread_schedule_limits(uint32_t limits_us)
|
|||
|
||||
RB_VM_SAVE_MACHINE_CONTEXT(th);
|
||||
thread_sched_yield(TH_SCHED(th), th);
|
||||
rb_ractor_thread_switch(th->ractor, th);
|
||||
rb_ractor_thread_switch(th->ractor, th, true);
|
||||
|
||||
RUBY_DEBUG_LOG("switch %s", "done");
|
||||
}
|
||||
|
@ -1518,7 +1518,7 @@ blocking_region_end(rb_thread_t *th, struct rb_blocking_region_buffer *region)
|
|||
unregister_ubf_list(th);
|
||||
|
||||
thread_sched_to_running(TH_SCHED(th), th);
|
||||
rb_ractor_thread_switch(th->ractor, th);
|
||||
rb_ractor_thread_switch(th->ractor, th, false);
|
||||
|
||||
th->blocking_region_buffer = 0;
|
||||
rb_ractor_blocking_threads_dec(th->ractor, __FILE__, __LINE__);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue