delete sleep and add mutex before condition wait

Change-Id: I58998db3b1b0601a69b29107a4f07ec010d8f7c6