Ensure concurency of the pool and no task loss with refresh lock.