PHP 8.6.0 Beta 1 is available for testing

Thread::join

(PECL pthreads >= 2.0.0)

Thread::joinSincronización

Descripción

public function Thread::join(): bool

Permite esperar al contexto llamante del Thread referenciado hasta que finalice la ejecución.

Parámetros

Esta función no contiene ningún parámetro.

Valores devueltos

Esta función retorna true en caso de éxito o false si ocurre un error.

Ejemplos

Ejemplo #1 Une el Thread referenciado

<?php
class My extends Thread {
 public function run() {
 /* ... */
 }
}
$my = new My();
$my->start();
/* ... */
var_dump($my->join());
/* ... */
?>

El ejemplo anterior mostrará:

bool(true)

Found A Problem?

Learn How To Improve This PageSubmit a Pull RequestReport a Bug
+add a note

User Contributed Notes

There are no user contributed notes for this page.

AltStyle によって変換されたページ (->オリジナル) /