Lines Matching refs:this

40      *   open requests. When this number is reached, the queued futures are
48 $this->_mh = $options['mh'];
50 $this->factory = isset($options['handle_factory'])
52 $this->selectTimeout = isset($options['select_timeout'])
54 $this->maxHandles = isset($options['max_handles'])
61 return $this->_mh = curl_multi_init();
70 if ($this->handles) {
71 $this->execute();
74 if (isset($this->_mh)) {
75 curl_multi_close($this->_mh);
76 unset($this->_mh);
82 $factory = $this->factory;
97 [$this, 'execute'],
99 return $this->cancel($id);
103 $this->addRequest($entry);
106 if (count($this->handles) >= $this->maxHandles) {
107 $this->execute();
120 if ($this->active &&
121 curl_multi_select($this->_mh, $this->selectTimeout) === -1
129 if ($this->delays) {
130 $this->addDelays();
134 $mrc = curl_multi_exec($this->_mh, $this->active);
137 $this->processMessages();
140 if (!$this->active && $this->delays) {
144 } while ($this->active || $this->handles);
150 $this->handles[$id] = $entry;
155 $this->delays[$id] = microtime(true) + ($entry['request']['client']['delay'] / 1000);
157 curl_multi_add_handle($this->_mh, $entry['handle']);
159 curl_multi_add_handle($this->_mh, $entry['handle']);
163 $mrc = curl_multi_exec($this->_mh, $this->active);
165 $this->processMessages();
172 if (isset($this->handles[$id])) {
174 $this->_mh,
175 $this->handles[$id]['handle']
177 curl_close($this->handles[$id]['handle']);
178 unset($this->handles[$id], $this->delays[$id]);
192 if (!isset($this->handles[$id])) {
196 $handle = $this->handles[$id]['handle'];
197 unset($this->delays[$id], $this->handles[$id]);
198 curl_multi_remove_handle($this->_mh, $handle);
208 foreach ($this->delays as $id => $delay) {
210 unset($this->delays[$id]);
212 $this->_mh,
213 $this->handles[$id]['handle']
221 while ($done = curl_multi_info_read($this->_mh)) {
224 if (!isset($this->handles[$id])) {
229 $entry = $this->handles[$id];
238 $this,
245 $this->removeProcessed($id);