# File test/test_queue.rb, line 53
    def test_push_close
      spin_lock1 = true
      spin_lock2 = true

      Thread.new{
        @queue.push(PseudoIO.new)
        @queue.push(PseudoIO.new)
        spin_lock1 = false
        @queue.push(PseudoIO.new)
        @queue.push(PseudoIO.new)
      }

      Thread.new{
        while (spin_lock1)
          # wait for thread 1.
        end
        @queue.push_close
        @queue.push_close
        spin_lock2 = false
      }

      while (spin_lock2)
        # wait for thread 2.
      end
      assert_equal(Rucy::SocketQueue::CMD_CLOSE, @queue.pop)
      assert_equal(Rucy::SocketQueue::CMD_CLOSE, @queue.pop)
      assert_instance_of(PseudoIO, @queue.pop)
      assert_instance_of(PseudoIO, @queue.pop)
      assert_instance_of(PseudoIO, @queue.pop)
      assert_instance_of(PseudoIO, @queue.pop)
    end