Use RWMutex instead of Mutex.