Everpure Interview Question

Implement a function with mutex lock.