add thread lock demo