Variável de objeto perde o contexto em PHP pthreads
Eu estava trabalhando com pthreads em PHP e notei que pthreads perde variáveis de objeto em seu contexto, isso é normal ou é um bug ou estou fazendo algo errado?
class Downloader extends Thread {
private $ch;
public function __construct($data) {
$this->ch = curl_init();
}
public function __destruct() {
curl_close($this->ch);
}
public function run() {
// we just lost resource of curl -> [resource(4) of type (Unknown)]
curl_setopt($this->ch, CURLOPT_URL, $this->url);
}
}