Menu

Cannot Join a Thread!

Help
Anonymous
2001-03-30
2001-04-05
  • Anonymous

    Anonymous - 2001-03-30

    I cannot join a Thread.
    Please tell me how to join a Thread.
    Thanks.

     
    • David Sugar

      David Sugar - 2001-04-05

      "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.

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.