Make use of mutex easier to see

With the access to the data, the use of the actual mutex could have been
confused. By simply using the mutex the example is a lot more clear.