ThreadedFactory::destroy PHP Method

destroy() public static method

public static destroy ( Threaded $threaded )
$threaded Threaded
    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;
    }