Initial code to thread type
Merge remote-tracking branch 'origin/master'
Wait statment fixed
- Fixed conflicts