Implement a thread safe resource repo