chat: use RWMutex.