close blocking queue input gracefully