(PECL pthreads >= 2.0.0)
Execution
public void Thread::kill ( void )
Forces the referenced Thread to terminate
Returns:
A boolean indication of success
The programmer should not ordinarily kill Threads by force
Examples:
Kill the referenced Thread
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 | <?php class T extends Thread { public function run() { while (( $line = fgets ( $stdin ))) { echo $line ; } } } $t = new T(); $t ->start(); var_dump( $t ->kill()); ?> |
The above example will output:
bool(true)
Please login to continue.