In a loop there are many `callback`, I want to call `pool.end()` after all `callback` end, so how to know that moment that all connections are released?