php - Run parallel handler of curl with curl_multi_exec -


why in piece of code need call 2 times curl_multi_exec function.

on first loop i'm executing curl_multi_exec handler run sub handler. when curlm_call_multi_perform different $mrc loop ends.

in second loop, find results curl handlers, , first loop executed again, why?

<?php       {         $mrc = curl_multi_exec($multihandle, $active);     } while ($mrc == curlm_call_multi_perform);      while ($active && $mrc == curlm_ok) {         if (curl_multi_select($multihandle, $timeout) != -1) {             {                 $mrc = curl_multi_exec($multihandle, $active);             } while ($mrc == curlm_call_multi_perform);         }     }  ?> 

the code extracted php-doc site

the answers here curl_multi_exec().

it's frustrating php's documentation can useless in aspects ...


Comments

Popular posts from this blog

java - Play! framework 2.0: How to display multiple image? -

gmail - Is there any documentation for read-only access to the Google Contacts API? -

php - Controller/JToolBar not working in Joomla 2.5 -