implementing mutex protection when writting and reading
Mege nothing mean