Hi,

sounds good. I just do not see, how to implement it easily. I don't want to put the whole thread pool code into a template and hence in a header. Maybe you have a Idea.

When we move to C++11, std::function may be the replacement for callable. I haven't looked that deep into it to have actually plan, how to improve cxxtools with C++11.

There are too many professional projects, which have not yet switched to C++11. Or at least one: the one I'm working on at my day job. Professionals tend not to change anything when not absolutely needed. We have a old compiler (IBM xlc 9.0), which do not have C++11 support and I can't see, how to change that.

Tommi

Am 09.10.2013 20:28, schrieb Leandro Santiago:
Hello to all.

Currently cxxtools::ThreadPool accepts only callable function/objects which type is void and has no parameters.

I think it would be very useful if it was enough generic to support other of callable objects.

It would be something like

ThreadPool<void(int,string)> pool(10);

Or

ThreadPool<void,int,string> pool(10);

So I could call:

pool.schedule(Function(do_something,20,"abcde"));

Does anyone else think it would be useful?

Thanks in advance.

--
Sent from my mind


------------------------------------------------------------------------------
October Webinars: Code for Performance
Free Intel webinars can help you accelerate application performance.
Explore tips for MPI, OpenMP, advanced profiling, and more. Get the most from
the latest Intel processors and coprocessors. See abstracts and register >
http://pubads.g.doubleclick.net/gampad/clk?id=60134071&iu=/4140/ostg.clktrk


_______________________________________________
Tntnet-general mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/tntnet-general

------------------------------------------------------------------------------
October Webinars: Code for Performance
Free Intel webinars can help you accelerate application performance.
Explore tips for MPI, OpenMP, advanced profiling, and more. Get the most from 
the latest Intel processors and coprocessors. See abstracts and register >
http://pubads.g.doubleclick.net/gampad/clk?id=60134071&iu=/4140/ostg.clktrk
_______________________________________________
Tntnet-general mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/tntnet-general

Reply via email to