Ruby 4.0 リファレンスマニュアル

instance method Thread::SizedQueue#length

length -> IntegerRuby 2.5.0 から[permalink][rdoc][edit]
size -> Integer

キューの長さを返します。