|
Boost Users : |
From: Daniel Krügler (dsp_at_[hidden])
Date: 2008-05-29 03:03:17
he xiang wrote:
> Hi, all
> When I use thread_group to create 400 threads , it throws a
> boost::thread_resource_error ?
> Is there a limit for the number of threads created by
> thread_group.create_thread() ?
> Thanks so much.
There is no such artificial limit on the boost side.
boost::thread_resource_error is always thrown, if the
corresponding OS cannot fulfill the corresponding
native request, e.g. if on Windows _beginthreadex fails or
if on a pthread environment pthread_create fails.
The most reasonable assumption is, that your OS cannot
provide these 400 threads at the point where you try to get them.
Greetings from Bremen,
Daniel Krügler
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