add thread mutex demo code