Thread: Thread join() question

Threaded View

Previous Post Previous Post   Next Post Next Post
  1. #1
    Registered User
    Join Date
    May 2010
    Posts
    178

    Thread join() question

    "Blocks the current thread until the thread identified by *this finishes its execution. "

    join() appears similar to function in Java but the description given in cppreference.com is a bit terse and not very explanatory.

    Does this mean that the current thread, for instance being the only one started in main,

    Code:
    thread run(foo);
    will block until int main returns?

    Can someone please elaborate?
    Last edited by Imanuel; 01-27-2013 at 07:03 PM.

Popular pages Recent additions subscribe to a feed

Similar Threads

  1. Replies: 3
    Last Post: 11-20-2011, 12:01 AM
  2. IPC thread question
    By Izzy123 in forum C Programming
    Replies: 2
    Last Post: 06-17-2011, 09:09 AM
  3. Question on thread
    By flexo87 in forum C Programming
    Replies: 10
    Last Post: 01-28-2009, 10:52 AM
  4. question about thread
    By wgan in forum Windows Programming
    Replies: 6
    Last Post: 06-30-2003, 12:36 PM
  5. General Thread question
    By Magos in forum Windows Programming
    Replies: 3
    Last Post: 09-13-2002, 12:49 PM