Boost logo

Boost Users :

From: Peter Dimov (pdimov_at_[hidden])
Date: 2006-10-12 16:34:22


Prashant Thakre wrote:
> Roland Schwarz <roland.schwarz <at> chello.at> writes:
>
>> What do you expect? You cant simply create threads beyond the
>> system limits, which is roughly 2000 on my box.
>> I tried your code with a really short lived thread:
>> by using function void f() {}.
>> This runs "forever". When running in a debugger, then setting
>> a breakpoint, you will see no threads beyond the main running.
>
> On Solaris 10, this example works just fine. I am just trying to say
> that behaviour on Windows is different from what one would observe on
> systems with pthreads, since storage for the *thread* can be
> reclaimed when that thread terminates(pthread_detach).

There is no detach on Windows, all threads are "detached" by default.
There's no join either, you can wait for the thread to end if you like, but
this is not required and has no effect on the "storage" for the thread, it's
reclaimed either way.


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