Boost logo

Boost Users :

Subject: Re: [Boost-users] Problem with boost:thread
From: Igor R (boost.lists_at_[hidden])
Date: 2010-03-04 12:17:48


>     Trash myTrash("hello");
>     myTrash.start();

At this point your main thread *ends* and the program ends, so the 2nd
thread doesn't have an opportunity to do anything. That's why you need
to wait for the 2nd thread -- by means of join().


Boost-users list run by williamkempf at hotmail.com, kalb at libertysoft.com, bjorn.karlsson at readsoft.com, gregod at cs.rpi.edu, wekempf at cox.net