Hi,

i have a coulpe of different machines with MySQL Servers running on it. Now, i want to execute queries for all Databases at the same time and collect the Result to process it.

I am new to the parallelism - so maybe i understand something totaly wrong.
What i tring is something like this:

<code>
{
 auto tPool = new TaskPool();
 forach(server ; servers)
 {
  auto task = task!queryWorker(query);
  tPool.put(task);
 }

 tPool.finish(true);
//--------> how to collect the results now? <-------

}

row[] queryWorker(string query) {

 //rows = result of the query

 return rows;
}
</code>

btw.. how to markup code in this forum?

Reply via email to