array ( 0 => 'index.php', 1 => 'PHP Manual', ), 'head' => array ( 0 => 'UTF-8', 1 => 'es', ), 'this' => array ( 0 => 'worker.shutdown.php', 1 => 'Worker::shutdown', ), 'up' => array ( 0 => 'class.worker.php', 1 => 'Worker', ), 'prev' => array ( 0 => 'worker.isshutdown.php', 1 => 'Worker::isShutdown', ), 'next' => array ( 0 => 'worker.stack.php', 1 => 'Worker::stack', ), 'alternatives' => array ( ), 'source' => array ( 'lang' => 'en', 'path' => 'reference/pthreads/worker/shutdown.xml', ), ); $setup["toc"] = $TOC; $setup["toc_deprecated"] = $TOC_DEPRECATED; $setup["parents"] = $PARENTS; manual_setup($setup); ?>
(PECL pthreads >= 2.0.0)
Worker::shutdown — Shutdown the worker
Shuts down the worker after executing all of the stacked tasks.
Esta función no tiene parámetros.
Ejemplo #1 Shutdown the referenced worker
<?php
$my = new Worker();
$my->start();
/* stack/execute tasks */
var_dump($my->shutdown());
El resultado del ejemplo sería:
bool(true)