downloads | documentation | faq | getting help | mailing lists | licenses | wiki | reporting bugs | php.net sites | conferences | my php.net

search for in the

Worker::isShutdown> <Worker::getStacked
[edit] Last updated: Fri, 17 May 2013

view this page in

Worker::getThreadId

(PECL pthreads >= 0.36)

Worker::getThreadIdIdentification

Beschreibung

final public long Worker::getThreadId ( void )

Will return the identity of the referenced Worker

Parameter-Liste

Diese Funktion hat keine Parameter.

Rückgabewerte

A numeric identity

Beispiele

Beispiel #1 Return the identity of the referenced Worker

<?php
class My extends Worker {
    public function 
run() {
        
printf("%s is Worker #%lu\n"__CLASS__$this->getThreadId());
    }
}
$my = new My();
$my->start();
?>

Das oben gezeigte Beispiel erzeugt folgende Ausgabe:

My is Worker #123456778899



add a note add a note User Contributed Notes Worker::getThreadId - [0 notes]
There are no user contributed notes for this page.

 
show source | credits | stats | sitemap | contact | advertising | mirror sites