Advertisement
Guest User

Untitled

a guest
Nov 29th, 2012
202
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
PHP 0.63 KB | None | 0 0
  1. do {
  2.     $status = curl_multi_exec($mh, $active);
  3.     $info = curl_multi_info_read($mh);
  4.  
  5.     if ( false !== $info ) {
  6.         $ch = $info['handle'];
  7.         $callout = $queue[ (string) $ch ];
  8.         $body = curl_multi_getcontent($ch);
  9.  
  10.         // Remove the Queue
  11.         curl_multi_remove_handle($this->cmh, $ch);
  12.  
  13.         // Handle the last mile of the request
  14.         $result = $this->executeOnComplete($callout, $body);
  15.         call_user_func($callout->request->callback, $result, $callout);
  16.  
  17.         // Reset active incase the callback added messages to the queue
  18.         $active = true;
  19.     }
  20.  
  21. } while ($status === CURLM_CALL_MULTI_PERFORM || $active);
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement