Threaded::getTerminationInfo
(PECL pthreads >= 2.0.0)
Threaded::getTerminationInfo — Error Detection
Description
public array Threaded::getTerminationInfo
( void
)
Retrieves terminal error information from the referenced object
Parameters
This function has no parameters.
Return Values
array containing the termination conditions of the referenced object
Examples
Example #1 Detecting fatal errors in Threads
<?php
class My extends Thread {
public function run() {
@not_found();
}
}
$my = new My();
$my->start();
$my->join();
var_dump($my->isTerminated(), $my->getTerminationInfo());
?>
The above example will output:
bool(true) array(4) { ["scope"]=> string(2) "My" ["function"]=> string(3) "run" ["file"]=> string(29) "/usr/src/pthreads/sandbox.php" ["line"]=> int(4) }
- PHP Руководство
- Функции по категориям
- Индекс функций
- Справочник функций
- Расширения для управления процессами программ
- pthreads
- Функция Threaded::chunk() - Manipulation
- Функция Threaded::count() - Manipulation
- Threaded::extend
- Threaded::from
- Функция Threaded::getTerminationInfo() - Error Detection
- Функция Threaded::isRunning() - State Detection
- Функция Threaded::isTerminated() - State Detection
- Функция Threaded::isWaiting() - State Detection
- Функция Threaded::lock() - Synchronization
- Функция Threaded::merge() - Manipulation
- Функция Threaded::notify() - Synchronization
- Функция Threaded::pop() - Manipulation
- Функция Threaded::run() - Execution
- Функция Threaded::shift() - Manipulation
- Функция Threaded::synchronized() - Synchronization
- Функция Threaded::unlock() - Synchronization
- Функция Threaded::wait() - Synchronization
Коментарии
404 Not Found