static VALUE wake_all(List *list) { while (list->entries) { wake_one(list); } return Qnil; }
static VALUE unlock_mutex_inner(Mutex *mutex) { VALUE waking; if (!RTEST(mutex->owner)) { return Qundef; } mutex->owner = Qnil; waking = wake_one(&mutex->waiting); return waking; }
static VALUE unlock_mutex_inner(Mutex *mutex) { VALUE waking; if (mutex->owner != rb_thread_current()) { rb_raise(rb_eThreadError, "not owner"); } waking = wake_one(&mutex->waiting); mutex->owner = waking; return waking; }