On windows it could be done by `WaitSingleObject` and on pthread i think it could be done by [pthread_kill](http://stackoverflow.com/questions/5764045/how-to-know-if-a-pthread-died)
On windows it could be done by
WaitSingleObjectand on pthread i think it could be done by pthread_kill