Skip to content

Commit 5ef4f88

Browse files
committed
use ractor_sched_lock
instead of using `rb_native_mutex_lock` directly.
1 parent 1794cfe commit 5ef4f88

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

thread_pthread_mn.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1078,12 +1078,12 @@ timer_thread_polling(rb_vm_t *vm)
10781078

10791079
switch (r) {
10801080
case 0: // timeout
1081-
rb_native_mutex_lock(&vm->ractor.sched.lock);
1081+
ractor_sched_lock(vm, NULL);
10821082
{
10831083
// (1-1) timeslice
10841084
timer_thread_check_timeslice(vm);
10851085
}
1086-
rb_native_mutex_unlock(&vm->ractor.sched.lock);
1086+
ractor_sched_unlock(vm, NULL);
10871087
break;
10881088

10891089
case -1: // error

0 commit comments

Comments
 (0)