denoise func waits for queue to become empty