Added RWMutex for concurrent operation

Previously concurrency of requests was not supported, which was not
workable if the calling package operated concurrently.