Use ReadWriteLock for the pools container instead of Mutex