hello, i have a queue of urls and i am passing to an function it crawls and gets the url each url in a queue should be in parellel and crawl is an class and start is my function it crawls the url and if i run the program the each urls is executed one by one not in parallel
while(!q.empty())
{
#pragma omp parallel for
{
for(int n=0; n<q.size(); ++n)
{
crawl.start(q.front());
q.pop();
}
}
}
output
http://www.bing.com
http://www.bing.com/?scope=images&amp;FORM=Z9LH
http://www.bing.com/?scope=news&amp;FORM=Z9LH2
http://www.bing.com/?scope=video&amp;FORM=Z9LH1
http://www.bing.com/explore?FORM=BXLH
http://www.google.co.in
http://www.google.co.in/advanced_search?hl=en
http://www.google.co.in/intl/en/about.html
http://www.google.co.in/intl/en/ads/
http://www.google.co.in/intl/en/privacy.html
it seems the process is not parallel can any one tell me how can i do this in parallel