public static function async(array $tasks): array
    {
        $server = App::$server->getServer();

        $result = [];
        foreach ($tasks as $task) {
            if (! isset($task['type']) || ! isset($task['name']) || ! isset($task['method']) || ! isset($task['params'])) {
                App::error(sprintf('Task %s format error.', $task['name'] ?? '[UNKNOWN]'));
                continue;
            }

            if ($task['type'] !== static::TYPE_ASYNC) {
                App::error(sprintf('Task %s is not a asynchronous task.', $task['name']));
                continue;
            }

            $data = TaskHelper::pack($task['name'], $task['method'], $task['params'], $task['type']);
            $result[] = $server->task($data);
        }

        return $result;
    }