pthreads
pthreads copied to clipboard
const arrays cause seg fault
Seems that if you try to use a const that is an array defined outside the thread, then it seg faults.
const ROOMS = array('room01','room02');
class Test extends Thread {
public function run() {
echo "thread test:".ROOMS[0]."\n";
}
}
print "main test:".ROOMS[0]."\n";
$test = new Test();
$test->start();
$test->join();