diff options
| author | Nobuyoshi Nakada <nobu@ruby-lang.org> | 2025-05-15 17:48:40 +0900 |
|---|---|---|
| committer | Nobuyoshi Nakada <nobu@ruby-lang.org> | 2025-05-15 17:48:40 +0900 |
| commit | 2e3f81838c6bf6408c154eee840a231312666fcd (patch) | |
| tree | 18ff235615b80400e8385bb1bd23ae5f78e7dd76 /ractor.c | |
| parent | 427ede2dde522327b4e3e6d18866b6cfe4423eb4 (diff) | |
Align styles [ci skip]
Diffstat (limited to 'ractor.c')
| -rw-r--r-- | ractor.c | 6 |
1 files changed, 4 insertions, 2 deletions
@@ -538,7 +538,8 @@ ractor_sleeping_by(const rb_ractor_t *r, rb_thread_t *th, enum rb_ractor_wait_st if ((th->ractor_waiting.wait_status & wait_status) && th->ractor_waiting.wakeup_status == wakeup_none) { return th; } - } else { + } + else { // find any thread that has this ractor wait status that is blocked ccan_list_for_each(&r->sync.wait.waiting_threads, th, ractor_waiting.waiting_node) { if ((th->ractor_waiting.wait_status & wait_status) && th->ractor_waiting.wakeup_status == wakeup_none) { @@ -679,7 +680,8 @@ ractor_sleep_wo_gvl(void *ptr) ractor_cond_wait(cr, cur_th); cur_th->status = THREAD_RUNNABLE; VM_ASSERT(cur_th->ractor_waiting.wakeup_status != wakeup_none); - } else { + } + else { RUBY_DEBUG_LOG("rare timing, no cond wait"); } cur_th->ractor_waiting.wait_status = wait_none; |
