wait for unlock when getting queue size