Menu

Joining a thread

Help
2000-07-13
2000-09-29
  • Raphael Alla

    Raphael Alla - 2000-07-13

    How do you join a thread in Common C++?

     
    • David Sugar

      David Sugar - 2000-07-14

      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.

       
      • Antonio Caputo

        Antonio Caputo - 2000-09-29

        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 ?

         

Log in to post a comment.

Want the latest updates on software, tech news, and AI?
Get latest updates about software, tech news, and AI from SourceForge directly in your inbox once a month.