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

search for in the

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

view this page in

Worker::getCreatorId

(PECL pthreads >= 0.36)

Worker::getCreatorIdIdentification

Description

final public long Worker::getCreatorId ( void )

Retourne l'identité du Thread qui a créé le Thread référencé.

Liste de paramètres

Cette fonction ne contient aucun paramètre.

Valeurs de retour

Une identité numérique.

Exemples

Exemple #1 Retourne l'identité du Thread ou du processus créé par le Worker référencé

<?php
class My extends Thread {
    public function 
run() {
        
printf("%s a été créé par le Thread #%lu\n"__CLASS__$this->getCreatorId());
    }
}
$my = new My();
$my->start();
?>

L'exemple ci-dessus va afficher :

My a été créé par le Thread #123456778899



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

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