replace container waitLock by a RWMutex