зеркало из https://github.com/github/ruby.git
add debug log to `rb_ractor_thread_switch`
This commit is contained in:
Родитель
fdfd50d006
Коммит
369bdff9ca
|
@ -280,6 +280,10 @@ rb_ractor_sleeper_thread_num(rb_ractor_t *r)
|
||||||
static inline void
|
static inline void
|
||||||
rb_ractor_thread_switch(rb_ractor_t *cr, rb_thread_t *th)
|
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 (cr->threads.running_ec != th->ec) {
|
||||||
if (0) {
|
if (0) {
|
||||||
ruby_debug_printf("rb_ractor_thread_switch ec:%p->%p\n",
|
ruby_debug_printf("rb_ractor_thread_switch ec:%p->%p\n",
|
||||||
|
|
Загрузка…
Ссылка в новой задаче