Added timeout for blocking queue polling