Attempt at mutex locking.