Thread::getCurrentThread

(PECL pthreads >= 2.0.0)

Thread::getCurrentThreadIdentification

Описание

public static Thread Thread::getCurrentThread ( void )

Return a reference to the currently executing Thread

Список параметров

У этой функции нет параметров.

Возвращаемые значения

An object representing the currently executing Thread

Примеры

Пример #1 Return the currently executing Thread

<?php
class My extends Thread {
    public function 
run() {
        
var_dump(Thread::getCurrentThread());
    }
}
$my = new My();
$my->start();
?>

Результат выполнения данного примера:

object(My)#2 (0) {
}

Коментарии

404 Not Found

404 Not Found


nginx

    Поддержать сайт на родительском проекте КГБ