public static function execute(callable $callback, Driver $driver = null)
    {
        $previousDriver = self::$driver;

        self::$driver = $driver ?: self::createDriver();
        self::$level++;

        try {
            self::$driver->defer($callback);
            self::$driver->run();
        } finally {
            self::$driver = $previousDriver;
            self::$level--;
        }
    }