It's not so much happening inside the lock and using spin lock instead of mutex lock will give some speedup due to smaller latency of resuming the thread when mutex was locked.
It's not so much happening inside the lock and using spin lock instead of mutex lock will give some speedup due to smaller latency of resuming the thread when mutex was locked.