You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository has been archived by the owner on Dec 16, 2019. It is now read-only.
Hi @krakjoe, during the migration from pthreads 2 to 3, I stumbled about this unexpected behaviour. If the set_exception_handler is set within a Thread::run, the catch of a try-catch gets ignored.
class Thrower extends Thread
{
public function run()
{
set_exception_handler(function($message)
{
var_dump('Thread ExceptionHandler', $message);
flush();
});
try
{
throw new \Exception();
}
catch(Exception $e) // ignored
{
var_dump('CatchedException', $e);
}
}
}
$objThrower = new Thrower();
$objThrower->start();
$objThrower->join();
If set_exception_handler is not set, everything works fine.
win7
pthreads 3.0.7
php 7 RC 4
The text was updated successfully, but these errors were encountered:
Hi @krakjoe, during the migration from pthreads 2 to 3, I stumbled about this unexpected behaviour. If the set_exception_handler is set within a Thread::run, the catch of a try-catch gets ignored.
If set_exception_handler is not set, everything works fine.
The text was updated successfully, but these errors were encountered: