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

search for in the

Thread::getThreadId> <Thread
[edit] Last updated: Fri, 24 May 2013

view this page in

Thread::getCreatorId

(PECL pthreads >= 0.36)

Thread::getCreatorIdIdentification

Description

final public long Thread::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 qui a créé le Thread 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 Thread::getCreatorId - [0 notes]
There are no user contributed notes for this page.

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