thread.cpp: Added mutex variable