Maintenance Ruby 3.4 gets fixes, but no new features. Switch to Ruby 4.0 →
instance method
Thread::SizedQueue#num_waiting
() -> ::Integer
num_waiting
thread_sync.c
View on GitHub ↗
static VALUE
rb_szqueue_num_waiting(VALUE self)
{
struct rb_szqueue *sq = szqueue_ptr(self);
return INT2NUM(sq->q.num_waiting + sq->num_waiting_push);
}
Returns the number of threads waiting on the queue.