test_queue.rb: non-blocking pop tests

* test/thread/test_queue.rb (test_queue_pop_non_block): test for
  non-blocking pop.

* test/thread/test_queue.rb (test_sized_queue_pop_non_block):
  ditto.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@46851 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
thread/thread.c: non-blocking push on SizedQueue

* ext/thread/thread.c (rb_szqueue_push): add optional parameter,
  non_block defaulted to false.  [ruby-core:63794] [Feature #10052]

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@46852 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
thread/thread.c: simplify

* ext/thread/thread.c (queue_pop_should_block): returns int
  instead of VALUE, and use rb_check_arity.

* ext/thread/thread.c (szqueue_push_should_block): ditto.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@46853 b2dd03c8-39d4-4d8f-98ff-823fe69b080e