Docs update for better writing.
Create and destroy the mutex outside of the thread to avoid race conditions when shutting down.