public static function destroy(\Threaded $threaded)
{
$instance = self::getInstance();
if (isset($instance->threadedList[$hash = spl_object_hash($threaded)])) {
$threaded->synchronized(function (\Threaded $t) {
$t->notify();
}, $threaded);
unset($instance->threadedList[$hash]);
return true;
}
return false;
}