Mutex to access shared variables