Re: [boost] GSOC - Boost.SQL and Boost.Thread interest
Hi Vicente !
if you are interested on one of these projects, please send as soon as possible to this ML a concrete proposal.> If both subject interest you, you can make two proposals. My main choice for Thread is: Thread.Pool (Proposal n°2 on my homepage: http://immortal-pc.info/Boost.html )General idea: ( Syntax highlighting at: http://immortal-pc.info/Boost.html#threadPool_idea ) int f1( const char* i ) { std::cout << i << ':'; // ... return 'f'+1; } int f2( const char* i ) { //... return 'f'+2; } int f3( const char* i ) { //... return 'f'+3; } int f4() { //... return 20+20+2;// 42 Power ! ^^ } int f5() { //... return 'f'+5; } int main() { // I want 5 threads for my job. Boost::Pool bp(5); // Note: A great option would be to use the "main thread" for calculations. (OpenMP like) // With this idea, 5 threads needed => 4 new theads + the main thread // // Another interesting option would be to provide switch between thread and process (fork) // I love Python multiprocessing: // http://docs.python.org/2/library/multiprocessing.html#using-a-pool-of-worker... // Note: Using, C++11 Brace-Initialization => std::initializer_list // Map function will call f1("Data1"), f1("Data2"), ... // >> ONE CALL PER parameter bp.map(f1, {"Data1","Data2","Data3","Data4","Data5","Data6","Data7"} );//!< WAITING function // "apply_async" will call {f1} with the parameter "Test" five times. // >> 1 CALL for f1 ! // >> 1 CALL for f2 ! // >> 1 CALL for f3 ! // >> f1 // f2 // f3 // -> // = paralell bp.apply_async(f1, "Test"); bp.apply_async(f2, "Test"); bp.apply_async(f3, "Test"); bp.execute();//!< WAINTING function // Or maybe a function who provide a result list for each function // Like this: std::array<int> functionsReturns = bp.get_result<int>();//!< WAITING function // And another great things from https://svn.boost.org/svn/boost/sandbox/async/libs/async/doc/html/toward_boo... // Multi-function without parameter // >> 1 CALL for f4 // >> 1 CALL for f5 // >> f4 // f5 // -> // = paralell // NOTE: same as: // bp.apply_async(f4); // bp.apply_async(f5); // bp.execute();//!< WAITING function bp.call_all(f4, f5);//!< WAITING function // Maybe a function who provide a result list for each function // Like this: std::array<int> functionsReturns = bp.get_result<int>(); return 0; }
The link doesn't worksOups. Sorry for the typo. http://immortal-pc.info/Boost.html Do you keep my proposal for Boost.SQL? Best,Guillaume
Hi Vicente !
if you are interested on one of these projects, please send as soon as possible to this ML a concrete proposal.> If both subject interest you, you can make two proposals. My main choice for Thread is: Thread.Pool You need to improve a lot your proposal for ThreadPool and async with much more detail on the problem to solve, the know techniques, how other
Le 23/04/13 21:56, Guillaume Nuel a écrit : libraries are solving it and what you propose and why do you think your proposal/approach is better.
The link doesn't worksOups. Sorry for the typo. http://immortal-pc.info/Boost.html Do you keep my proposal for Boost.SQL?
I would like to see a Boost.SQL library, but I'm not interested in mentoring it, but maybe others are. Best, vicente
participants (2)
-
Guillaume Nuel
-
Vicente J. Botet Escriba