Boost logo

Boost Users :

Subject: Re: [Boost-users] [thread_group] How to limit the number of simultaneous threads
From: Boost lzw (boostlzw_at_[hidden])
Date: 2012-08-08 06:49:36


Hi there,

I downloaded the thread pool library and add the followings to the include
path of VC++ project (MS2008 on Windows XP):
C:\threadpool-0_2_5-src\threadpool
C:\boost_1_50_0

I got two compiling errors:
1>c:\threadpool-0_2_5-src\threadpool\boost\threadpool\task_adaptors.hpp(138)
: error C2065: 'TIME_UTC' : undeclared identifier
1>c:\threadpool-0_2_5-src\threadpool\boost\threadpool\task_adaptors.hpp(149)
: error C2065: 'TIME_UTC' : undeclared identifier

in just including the pool's head file in my project:
#include <iostream>
#include <threadpool.hpp>
using namespace boost::threadpool;
int main()
{
 return 0;
}

Did I miss sth.?

Thanks,
Robert

On Mon, Jul 16, 2012 at 1:16 PM, Olivier Tournaire <olitour_at_[hidden]>wrote:

> Thanks Igor. This is exactly what I was looking for.
>
> Regards
>
>
> 2012/7/16 Igor R <boost.lists_at_[hidden]>
>
>> > I would like to add some multithreading in my application. Suppose I
>> have a
>> > set of m tasks to do, and I want to limit the number of simultaneous
>> threads
>> > to n. I have really no idea on how to do this and would like to have
>> some
>> > hints. Could you help me?
>>
>> thread_group is just a convenient container for thread objects.
>> What you need is thread pool, like this:
>> http://threadpool.sourceforge.net/
>> _______________________________________________
>> Boost-users mailing list
>> Boost-users_at_[hidden]
>> http://lists.boost.org/mailman/listinfo.cgi/boost-users
>>
>
>
> _______________________________________________
> Boost-users mailing list
> Boost-users_at_[hidden]
> http://lists.boost.org/mailman/listinfo.cgi/boost-users
>



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