write functions to read and write in a hash table in a multi threaded environment. Approach should give decent optimization in terms of time complexity.