public static function parallelSubmit ($requests) {
    $handles = array();
    $mh = curl_multi_init();

    // make a curl handle for each request
    foreach ($requests as $req) {
      $ch = $req->createCurlRequest();
      $handles[(string) $ch] = $req;
      curl_multi_add_handle($mh, $ch);
    }

    $reqsRunning = 0;

    // fire off initial requests
    do {
      $status = curl_multi_exec($mh, $reqsRunning);
    } while (CURLM_CALL_MULTI_PERFORM == $status);

    // process the requests
    while ($reqsRunning && CURLM_OK == $status) {
      // wait to be woken up by network activity
      $selectReady = curl_multi_select($mh);

      if ($selectReady > 0) {
        // one or more requests are finished
        while ($info = curl_multi_info_read($mh)) {
          self::handleMultiResponse($info, $mh, $handles);
        }
      } //end if selectReady

      if (-1 != $selectReady) {
        // continue processing
        do {
          $status = curl_multi_exec($mh, $reqsRunning);
        } while (CURLM_CALL_MULTI_PERFORM == $status);
      }
    } //end while requests to process

    // check for critical failure
    if (CURLM_OK != $status) {
      throw new Exception(
          "Fatal error [{$status}] processing multiple requests", $status);
    }

    // any remaining results should be ready now
    while ($handles && ($info = curl_multi_info_read($mh))) {
      self::handleMultiResponse($info, $mh, $handles);
    }

    curl_multi_close($mh);
    return $requests;
  }