I cannot join a Thread. Please tell me how to join a Thread. Thanks.
"delete" performs a join thru the destructor. Hence:
Thread *th = newThread(...); .... some code
delete th;
The delete will both cancel the thread and wait for a join..
Log in to post a comment.
I cannot join a Thread.
Please tell me how to join a Thread.
Thanks.
"delete" performs a join thru the destructor. Hence:
Thread *th = newThread(...);
.... some code
delete th;
The delete will both cancel the thread and wait for a join..