Dutch PHP Conference 2025 - Call For Papers

Worker::shutdown

(PECL pthreads >= 2.0.0)

Worker::shutdownShutdown the worker

Опис

public Worker::shutdown(): bool

Shuts down the worker after executing all of the stacked tasks.

Параметри

У цієї функції немає параметрів.

Значення, що повертаються

Повертає true у разі успіху або false в разі помилки.

Приклади

Приклад #1 Shutdown the referenced worker

<?php
$my
= new Worker();
$my->start();
/* stack/execute tasks */
var_dump($my->shutdown());

Поданий вище приклад виведе:

bool(true)

add a note

User Contributed Notes

There are no user contributed notes for this page.
To Top