diff options
author | Nobuyoshi Nakada <[email protected]> | 2021-06-16 22:07:05 +0900 |
---|---|---|
committer | Nobuyoshi Nakada <[email protected]> | 2021-06-17 10:13:40 +0900 |
commit | e4f891ce8d4833fea1e1f9abd69c2896d429a948 (patch) | |
tree | 81fb457e6485236fb55ab52628fdd8af9e0fcd64 /thread.c | |
parent | 4e097226370ec93bd25823d6a0dd34963619b1b9 (diff) |
Adjust styles [ci skip]
* --braces-after-func-def-line
* --dont-cuddle-else
* --procnames-start-lines
* --space-after-for
* --space-after-if
* --space-after-while
Diffstat (limited to 'thread.c')
-rw-r--r-- | thread.c | 15 |
1 files changed, 10 insertions, 5 deletions
@@ -549,7 +549,8 @@ rb_threadptr_join_list_wakeup(rb_thread_t *thread) if (target_thread->scheduler != Qnil && rb_fiberptr_blocking(join_list->fiber) == 0) { rb_fiber_scheduler_unblock(target_thread->scheduler, target_thread->self, rb_fiberptr_self(join_list->fiber)); - } else { + } + else { rb_threadptr_interrupt(target_thread); switch (target_thread->status) { @@ -820,7 +821,8 @@ thread_start_func_2(rb_thread_t *th, VALUE *stack_start) if ((state = EC_EXEC_TAG()) == TAG_NONE) { SAVE_ROOT_JMPBUF(th, thread_do_start(th)); - } else { + } + else { errinfo = th->ec->errinfo; if (state == TAG_FATAL) { @@ -1182,7 +1184,8 @@ thread_join_sleep(VALUE arg) if (scheduler != Qnil) { rb_fiber_scheduler_block(scheduler, target_th->self, p->timeout); - } else if (!limit) { + } + else if (!limit) { th->status = THREAD_STOPPED_FOREVER; rb_ractor_sleeper_threads_inc(th->ractor); rb_check_deadlock(th->ractor); @@ -1528,7 +1531,8 @@ rb_thread_sleep_deadly_allow_spurious_wakeup(VALUE blocker) VALUE scheduler = rb_fiber_scheduler_current(); if (scheduler != Qnil) { rb_fiber_scheduler_block(scheduler, blocker, Qnil); - } else { + } + else { thread_debug("rb_thread_sleep_deadly_allow_spurious_wakeup\n"); sleep_forever(GET_THREAD(), SLEEP_DEADLOCKABLE); } @@ -4276,7 +4280,8 @@ do_select(VALUE p) if (result > 0 && rb_fd_isset(set->sigwait_fd, set->rset)) { result--; (void)check_signals_nogvl(set->th, set->sigwait_fd); - } else { + } + else { (void)check_signals_nogvl(set->th, -1); } } |