You join a thread by deleting it. The destructor performs a join between the thread of the deleting object and the deleted thread object. You can also invoke Terminate() to join directly without deleting the object.
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
Hello I'm new here I'm begining my experience with threads, and corba,
looking for some common classes for threads, very pleased about your
proyect. Hoping my question does not bothers you:
Although I can join another thread with Terminate/delete, the Terminate
function first cancels the joined thread, so de joined thread must
be set to THREAD_CANCEL_DISABLED if I wan't it to finish.
Is this the expected behaviour, due to portability or other issue, or there
is another way to join similar to pthread_join function ?
Or is this a mistake in my expectations about joining a thread ?
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
How do you join a thread in Common C++?
You join a thread by deleting it. The destructor performs a join between the thread of the deleting object and the deleted thread object. You can also invoke Terminate() to join directly without deleting the object.
Hello I'm new here I'm begining my experience with threads, and corba,
looking for some common classes for threads, very pleased about your
proyect. Hoping my question does not bothers you:
Although I can join another thread with Terminate/delete, the Terminate
function first cancels the joined thread, so de joined thread must
be set to THREAD_CANCEL_DISABLED if I wan't it to finish.
Is this the expected behaviour, due to portability or other issue, or there
is another way to join similar to pthread_join function ?
Or is this a mistake in my expectations about joining a thread ?