Permite aguardar a conclusão de uma operação assíncrona sem valor de retorno, bem como obter o status de erro.
GERADO POR IAnão revisadoModelo: gemini-3.8-flash-medium · Esforço: medium · Temperatura: não controlável · Prompt: e943c154e07eProcedência
traduzido do guia alemãogemini-3.8-flash-low · 2026-10-13 · Original em alemão
Permite aguardar a conclusão de uma operação assíncrona sem valor de retorno, bem como obter o status de erro.
A classe ara::core::Future<void, E> permite a sincronização assíncrona e a verificação de erros de operações sem valor de retorno no AUTOSAR Adaptive [SWS_CORE_06236]. Como tipo não copiável, ela permite aguardar a conclusão, bem como a recuperação do resultado segura contra exceções como ara::core::Result<void, E>[SWS_CORE_06236] ou o processamento posterior assíncrono via função de continuação [SWS_CORE_06231]. Após a extração do resultado, o estado compartilhado é invalidado, de modo que chamadas subsequentes sem um estado válido representam uma violação [SWS_CORE_06236].
Contexto
A especialização da classe de template ara::core::Future<void, E> representa a extremidade receptora de uma operação assíncrona no AUTOSAR Adaptive que, em caso de conclusão bem-sucedida, não retorna valor, mas apenas sinaliza a ocorrência do evento ou um erro ocorrido. De acordo com a descrição da classe, a implementação deve responder à condição E != ara::core::ErrorCode com um erro de compilação. A classe interage tipicamente com um ara::core::Promise correspondente, que preenche o estado compartilhado (Shared State) [SWS_CORE_06236], bem como com contextos de execução assíncronos no registro de funções de continuação [SWS_CORE_06237].
Ciclo de vida
Instâncias de ara::core::Future<void, E> são objetos com semântica de movimento pura: o construtor de cópia [SWS_CORE_06234] e o operador de atribuição por cópia [SWS_CORE_06235] foram excluídos (delete). Um objeto criado através do construtor padrão não possui estado compartilhado e comporta-se de forma análoga a std::future[SWS_CORE_06222]. Por meio de construção por movimento [SWS_CORE_06223] ou atribuição por movimento [SWS_CORE_06225], uma instância assume a posse de um Shared State de outra instância.
O ciclo de vida é determinado de forma decisiva pelo estado do Shared State. Por meio do método valid(), é possível verificar se a instância está vinculada a um Shared State e, portanto, utilizável [SWS_CORE_06227]. Assim que o resultado for obtido por meio de GetResult()[SWS_CORE_06236] ou get()[SWS_CORE_06226], ou uma continuação for registrada via then()[SWS_CORE_06231], o objeto Future perde seu Shared State e valid() retorna false. O destrutor libera um estado compartilhado remanescente [SWS_CORE_06233]. Em relação à concorrência, operações de verificação e destruição como valid()[SWS_CORE_06227], is_ready()[SWS_CORE_06232] e o destrutor [SWS_CORE_06233] são thread-safe, enquanto operações modificadoras de estado como GetResult()[SWS_CORE_06236], get()[SWS_CORE_06226] e as funções de espera [SWS_CORE_06228] não são thread-safe.
No caminho de uso síncrono, um consumidor aguarda a conclusão da operação assíncrona. Com is_ready(), é possível consultar de forma não bloqueante se um valor ou um erro está presente [SWS_CORE_06232]. Como alternativa, pode-se aguardar de forma bloqueante por meio de wait()[SWS_CORE_06228], ou com limite de tempo via wait_for()[SWS_CORE_06229] e wait_until()[SWS_CORE_06230]. Estando o resultado disponível, a consulta do valor ocorre preferencialmente de forma segura contra exceções via GetResult(), retornando um ara::core::Result<void, E>[SWS_CORE_06236].
No caminho assíncrono, o método then() permite o registro de uma função de continuação (continuation), que é executada assim que o resultado estiver disponível [SWS_CORE_06231]. Aqui, pode ser passado opcionalmente um contexto de execução (executor) [SWS_CORE_06237]. A continuation recebe o Result<void, E> como rvalue. O tipo de retorno de then() desempacota automaticamente tipos aninhados de Future ou Result (unwrapping) [SWS_CORE_06231].
Se uma operação dependente de estado (como GetResult(), is_ready(), wait(), wait_for(), wait_until() ou then()) for chamada em uma instância inválida (valid() == false), ocorre uma violação de pré-condição tratada como FutureInvalidViolation[SWS_CORE_06228], [SWS_CORE_06229], [SWS_CORE_06230], [SWS_CORE_06231], [SWS_CORE_06232], [SWS_CORE_06236], [SWS_CORE_06237]. Na chamada de get() em uma instância inválida, é lançada, em vez disso, uma FutureException com o código de erro kNoState[SWS_CORE_06226]; get() não participa da resolução de sobrecarga quando as exceções C++ estão desativadas [SWS_CORE_06226].
Caso a promise correspondente tenha sido destruída ou tenha abandonado o estado compartilhado sem definir um resultado ou um erro explícito, o código de erro FutureErrc::kBrokenPromise é armazenado no Shared State de acordo com [SWS_CORE_00400][SWS_CORE_06226], [SWS_CORE_06236]. Este é retornado por GetResult() como erro no Result<void, E>[SWS_CORE_06236]. Se uma continuation registrada em then() lançar uma exceção que não implementa uma violação, isso leva a FutureContinuationHasThrownViolation[SWS_CORE_06231], [SWS_CORE_06237].
Este guia baseia-se exclusivamente na especificação AUTOSAR para ara::core::Future<void, E> no Release R25-11.
Returns nothing. This function shall behave the same as the corresponding std::future function. Part of the behavior taken from the std::future is that after a call to this function the Future is not valid anymore (valid() == false). ≙ std::future
Get the result. Similar to Future::get(), this call blocks until the value or an error is available. However, this call will never throw an exception. Part of the behavior taken from Future::get() is that after a call to this function the Future is not valid anymore (valid() == false).
Return whether the asynchronous operation has finished. If this function returns true, get(), Get Result() and the wait calls are guaranteed not to block.
Create a new Future with the content returned by func when passed the Result of this Future. func may be called in the context of this call or in the context of Promise::set_value() or Promise::SetError() or somewhere else. valid() == false on the original future object immediately after it returns. The Callable input argument "func" takes a Result<void,E> object as parameter. This will be the Result obtained via GetResult from the Future instance itself, on which .then() is being called. The Result is passed to func as an rvalue expression. The return type of then depends on the return type of func (aka continuation). Let U be the return type of the continuation (i.e. a type equivalent to std::invoke_result_ t<std::decay_t<F>,Result<void,E>>). • If U is Future<T2,E2> for some types T2, E2, then the return type of then() is Future<T2,E2>. This is known as implicit Future unwrapping. • If U is Result<T2,E2> for some types T2, E2, then the return type of then() is Future<T2,E2>. This is known as implicit Result unwrapping. • Otherwise it is Future<U,E>. Continuations that are registered with Future::then() are registered in the Future F that Future::then() returns. No such continuation shall be executed after the destructor of the Future F returns. A continuation that is already being executed shall run to completion. Note: that means that the destructor of Future might block until the currently running continuation has been completed. The continuation shall not throw, except for the purpose of implementing a Violation. Note: Exceptions can be used within the continuation, however if they do not realize a Violation, they must not escape the continuation. Note: Users who need to propagate information from closures’ exceptions should translate them to an error and return an ara::core::Result or ara::core::Future from the continuation with the error stored in it. ≙ std::invoke_result_
Sobrecargasthen2
template <typename F> auto then (F &&func) noexcept -> Future< <see below> >;SWS_CORE_06231
template <typename F, typename ExecutorT> auto then (F &&func, ExecutorT &&executor) noexcept -> Future< <see below> >;SWS_CORE_06237
Wait for the given period, or until a value or an error is available. This function shall behave the same as the corresponding std::future function ≙ std::future
Wait until the given time, or until a value or an error is available. This function shall behave the same as the corresponding std::future function. ≙ std::future
Get the result. Similar to Future::get(), this call blocks until the value or an error is available. However, this call will never throw an exception. Part of the behavior taken from Future::get() is that after a call to this function the Future is not valid anymore (valid() == false).
a Result as std::move(result from the shared state) with either a value or an error that has been put into the corresponding Promise. This can be because either: • explicit setting of the Error via Promise::SetError / Promise::Set Result or • the Promise was broken, meaning the shared state was abandoned by the corresponding Promise. Then the error is kBrokenPromise as defined in [SWS_CORE_00400]
Returns nothing. This function shall behave the same as the corresponding std::future function. Part of the behavior taken from the std::future is that after a call to this function the Future is not valid anymore (valid() == false).
GERADO POR IAnão revisadoModelo: gemini-3.8-flash-medium · Esforço: medium · Temperatura: não controlável · Prompt: 195e9e272b48Procedência
traduzido do guia alemãogemini-3.8-flash-low · 2026-10-13 · Original em alemão
A função-membro get da especialização ara::core::Future<void, E> serve para aguardar o resultado de uma operação assíncrona sem valor de retorno ([SWS_CORE_06226]). Ela se comporta como a função correspondente de std::future e bloqueia o chamador até que o resultado ou um erro esteja disponível ([SWS_CORE_06226], [SWS_CORE_00336]). Após a chamada, a instância de future perde sua validade, de modo que se aplica valid() == false ([SWS_CORE_06226]).
A função está declarada como não segura contra exceções (not exception safe) ([SWS_CORE_06226]). Se um erro tiver sido registrado no Promise associado, uma exceção correspondente será lançada ([SWS_CORE_06226]). Se o estado compartilhado tiver sido abandonado prematuramente, ocorrerá o código de erro kBrokenPromise de acordo com [SWS_CORE_00400] ([SWS_CORE_06226]). Se get for executado em uma instância já inválida, a função lançará um FutureException com o código de erro kNoState ([SWS_CORE_06226]).
Em relação à simultaneidade, o método não é seguro para threads (not thread-safe) ([SWS_CORE_06226]). Portanto, acessos paralelos ao mesmo objeto exigem sincronização externa. Além disso, a função não participa da resolução de sobrecarga se as exceções de C++ estiverem desativadas na toolchain do compilador ([SWS_CORE_06226]).
Na interação com funções relacionadas, [SWS_CORE_00332] (is_ready) garante que get comprovadamente não bloqueie, caso a operação já tenha sido concluída. Para contextos sem exceções, o AUTOSAR oferece como alternativa [SWS_CORE_00336] (GetResult), que reporta erros por meio de um tipo de resultado em vez de lançar exceções.
Este texto foi gerado por uma IA e serve como orientação; a especificação AUTOSAR é vinculativa.
Any exception of the type associated with the error that has been put into the corresponding Promise. This can be because either: • explicit setting of the Error via: Promise::SetError(E&&) Promise::SetError(const E&) / Promise::SetResult(const Result<T, E>&) Promise::SetResult(Result <T, E>&&) • the Promise was broken, meaning the shared state was abandoned by the corresponding Promise. Then the error is kBrokenPromise as defined in [SWS_CORE_00400]. FutureException in case the Future is invalid. The contained ErrorCode is kNoState
Hinweise: This function shall not participate in overload resolution when C++ exceptions are disabled in the compiler toolchain
Request a governed re-review of this record. The record is not changed immediately.
Return whether the asynchronous operation has finished. If this function returns true, get(), Get Result() and the wait calls are guaranteed not to block.
template <typename F> auto then (F &&func) noexcept -> Future< <see below> >;
Create a new Future with the content returned by func when passed the Result of this Future. func may be called in the context of this call or in the context of Promise::set_value() or Promise::SetError() or somewhere else. valid() == false on the original future object immediately after it returns. The Callable input argument "func" takes a Result<void,E> object as parameter. This will be the Result obtained via GetResult from the Future instance itself, on which .then() is being called. The Result is passed to func as an rvalue expression. The return type of then depends on the return type of func (aka continuation). Let U be the return type of the continuation (i.e. a type equivalent to std::invoke_result_ t<std::decay_t<F>,Result<void,E>>). • If U is Future<T2,E2> for some types T2, E2, then the return type of then() is Future<T2,E2>. This is known as implicit Future unwrapping. • If U is Result<T2,E2> for some types T2, E2, then the return type of then() is Future<T2,E2>. This is known as implicit Result unwrapping. • Otherwise it is Future<U,E>. Continuations that are registered with Future::then() are registered in the Future F that Future::then() returns. No such continuation shall be executed after the destructor of the Future F returns. A continuation that is already being executed shall run to completion. Note: that means that the destructor of Future might block until the currently running continuation has been completed. The continuation shall not throw, except for the purpose of implementing a Violation. Note: Exceptions can be used within the continuation, however if they do not realize a Violation, they must not escape the continuation. Note: Users who need to propagate information from closures’ exceptions should translate them to an error and return an ara::core::Result or ara::core::Future from the continuation with the error stored in it.
GERADO POR IAnão revisadoModelo: gemini-3.8-flash-medium · Esforço: medium · Temperatura: não controlável · Prompt: 161f9bad96abProcedência
traduzido do guia alemãogemini-3.8-flash-low · 2026-10-13 · Original em alemão
usar
O método then registra uma operação subsequente (continuation func) em uma instância de ara::core::Future<void, E>[SWS_CORE_06231]. O objeto invocável recebe o resultado da operação como uma expressão rvalue do tipo Result<void, E>, disponibilizada internamente via GetResult[SWS_CORE_06231]. A chamada de func pode ocorrer sincronicamente no contexto de then ou assincronicamente no contexto de Promise::set_value(), Promise::SetError() ou em outro local [SWS_CORE_06231].
Imediatamente após o retorno de then, o future original torna-se inválido (valid() == false) [SWS_CORE_06231]. O tipo de retorno adapta-se ao tipo de retorno U da continuation:
Se func retornar um Future<T2, E2>, ocorrerá um desempacotamento implícito e then retornará Future<T2, E2>[SWS_CORE_06231].
Se func retornar um Result<T2, E2>, este também será desempacotado implicitamente para Future<T2, E2>[SWS_CORE_06231].
Em todos os restantes casos, o tipo de retorno é Future<U, E>[SWS_CORE_06231].
Tratamento de erros e condições de contorno
Códigos de erro padronizados não são especificados para esta função [SWS_CORE_06231]. O método é declarado como noexcept, mas define duas violações (violations):
FutureInvalidViolation: Ocorre quando o método é chamado em um future inválido (caso valid() retorne false) [SWS_CORE_06231].
FutureContinuationHasThrownViolation: Ocorre quando a continuation lança uma exceção que não implementa uma violação [SWS_CORE_06231]. Em vez disso, erros na continuation devem ser retornados empacotados em um Result ou Future[SWS_CORE_06231].
Concorrência e interação
O método não é seguro para threads (not thread-safe) [SWS_CORE_06231]. Após o retorno do destrutor do future retornado, nenhuma continuation registrada será mais executada; no entanto, uma execução já em andamento será concluída, de modo que o destrutor pode bloquear [SWS_CORE_06231]. Enquanto [SWS_CORE_06231] se aplica a Future<void, E>, [SWS_CORE_00331] descreve a variante para futures tipados Future<T, E> e [SWS_CORE_06237] descreve a sobrecarga com executor explícito.
Este texto foi gerado por uma IA com base na especificação AUTOSAR.
FutureInvalidVio- If the Future is invalid (valid returns false) lation FutureContinua- If the continuation throws an exception tionHasThrownVio- lation
template <typename F, typename ExecutorT> auto then (F &&func, ExecutorT &&executor) noexcept -> Future< <see below> >;
Create a new Future with the content returned by func when passed the Result of this Future. func is called in the context of the provided execution context executor. valid() == false on the original future object immediately after it returns. The Callable input argument "func" takes a Result<void,E> object as parameter. This will be the Result obtained via GetResult from the Future instance itself, on which .then() is being called. The Result is passed to func as an rvalue expression. The return type of then depends on the return type of func (aka continuation). Let U be the return type of the continuation (i.e. a type equivalent to std::invoke_result_ t<std::decay_t<F>,Result<void,E>>). • If U is Future<T2,E2> for some types T2, E2, then the return type of then() is Future<T2,E2>. This is known as implicit Future unwrapping. • If U is Result<T2,E2> for some types T2, E2, then the return type of then() is Future<T2,E2>. This is known as implicit Result unwrapping. • Otherwise it is Future<U,E>. Continuations that are registered with Future::then() are registered in the Future F that Future::then() returns. No such continuation shall be executed after the destructor of the Future F returns. A continuation that is already being executed shall run to completion. Note: that means that the destructor of Future might block until the currently running continuation has been completed. The continuation shall not throw, except for the purpose of implementing a Violation. Note: Exceptions can be used within the continuation, however if they do not realize a Violation, they must not escape the continuation. Note: Users who need to propagate information from closures’ exceptions should translate them to an error and return an ara::core::Result or ara::core::Future from the continuation with the error stored in it.
GERADO POR IAnão revisadoModelo: gemini-3.8-flash-medium · Esforço: medium · Temperatura: não controlável · Prompt: 96d3b0e93b60Procedência
traduzido do guia alemãogemini-3.8-flash-low · 2026-10-13 · Original em alemão
A função then registra um objeto de continuação chamável (continuation) func em uma instância de ara::core::Future<void, E> para execução no contexto de execução especificado executor[SWS_CORE_06237]. Imediatamente após o retorno de then, a instância de Future chamadora perde sua validade, de modo que valid() == false é [SWS_CORE_06237]. A continuação recebe o resultado da instância de Future original como Result<void, E> passado sob a forma de uma expressão rvalue [SWS_CORE_06237]. Como valor de retorno, a chamada fornece uma nova instância de Future, em que tipos de retorno da continuação do tipo Future<T2, E2> ou Result<T2, E2> são desempacotados implicitamente para Future<T2, E2>; caso contrário, um Future<U, E> é retornado [SWS_CORE_06237].
Com relação à concorrência e ao ciclo de vida, a função está especificada como não segura para threads (not thread-safe) [SWS_CORE_06237]. A continuação é registrada no novo Future retornado. Após o retorno do destrutor desse novo Future, nenhuma continuação adicional pode ser executada; no entanto, uma continuação que já esteja em execução é concluída por inteiro, motivo pelo qual o destrutor do Future pode bloquear [SWS_CORE_06237].
A função não declara códigos de erro padronizados e está definida como noexcept[SWS_CORE_06237]. Se ela for chamada em uma instância de Future inválida, ocorre a violação FutureInvalidViolation[SWS_CORE_06237]. Caso a continuação lance uma exceção, isso leva à violação FutureContinuationHasThrownViolation[SWS_CORE_06237]. As exceções não podem sair da continuação; em vez disso, devem ser traduzidas, se necessário, em valores de erro e retornadas dentro de um Result ou Future[SWS_CORE_06237]. A função complementa a variante sem executor [SWS_CORE_06231] e constitui a contraparte das sobrecargas com valores [SWS_CORE_00331] e [SWS_CORE_00337].
Esta nota de uso foi criada por uma IA e baseia-se na especificação AUTOSAR R25-11.
FutureInvalidVio- If the Future is invalid (valid returns false) lation FutureContinua- If the continuation throws an exception. tionHasThrownVio- lation
Template-Parameter
Parameter
Beschreibung
FExecutorT
the type of the func argument the type of the executor argument
Parameter (in)
Parameter
Beschreibung
func
a callable to register
executor
the execution context in which to execute the Callable func
Checks if the Future is valid, i.e. if it has a shared state.
This function shall behave the same as the corresponding std::future function.
GERADO POR IAnão revisadoModelo: gemini-3.8-flash-medium · Esforço: medium · Temperatura: não controlável · Prompt: 480112e5c811Procedência
traduzido do guia alemãogemini-3.8-flash-low · 2026-10-13 · Original em alemão
A função valid() verifica de forma síncrona se a instância de ara::core::Future<void, E> possui um estado compartilhado (shared state) e, portanto, está utilizável [SWS_CORE_06227]. De acordo com a especificação, ela se comporta de forma análoga à função correspondente de std::future[SWS_CORE_06227]. Como valor de retorno, ela fornece true se o future puder ser utilizado e false se não puder ser utilizado [SWS_CORE_06227].
Em relação à concorrência e ao tratamento de erros, o método é declarado como noexcept, seguro contra exceções (exception safe) e expressamente especificado como thread-safe [SWS_CORE_06227]. Ele pode, portanto, ser chamado com segurança a partir de contextos concorrentes.
Na interação com outras operações, valid() serve para a proteção do ciclo de vida:
Se uma operação como wait()[SWS_CORE_06228] ou is_ready()[SWS_CORE_00332] for chamada em um objeto future inválido (valid() == false), isso dispara a violação FutureInvalidViolation.
Operações consumidoras invalidam o objeto: após uma chamada de get(), o future deixa de ser válido, de modo que verificações subsequentes com valid() resultam no valor false[SWS_CORE_06226].
Da mesma forma, encaminhamentos por meio de then()[SWS_CORE_00331] ou chamadas de GetResult()[SWS_CORE_00336] fazem com que o objeto future original seja invalidado imediatamente.
Esta nota de uso foi gerada por uma IA com base na especificação.
Wait for a value or an error to be available. This function shall behave the same as the corresponding std::future function
GERADO POR IAnão revisadoModelo: gemini-3.8-flash-medium · Esforço: medium · Temperatura: não controlável · Prompt: 2f9ee5ecd1d4ProcedênciaPerguntas em aberto (1)
traduzido do guia alemãogemini-3.8-flash-low · 2026-10-13 · Original em alemão
A função-membro wait da especialização ara::core::Future<void, E> bloqueia a thread chamadora sincronicamente até que o resultado da operação assíncrona esteja disponível na forma de um valor ou de um erro [SWS_CORE_06228]. A função não aceita parâmetros, não retorna valor (void) e se comporta, de acordo com a especificação, como a função correspondente de std::future[SWS_CORE_06228].
Em relação ao tratamento de erros e condições de contorno, aplicam-se os seguintes requisitos:
Segurança contra exceções e tratamento de erros: A operação é declarada com noexcept e especificada como segura contra exceções (exception safe) [SWS_CORE_06228]. Se valid() retornar false para a instância de future, ocorrerá a violação FutureInvalidViolation[SWS_CORE_06228]. A consequência concreta dessa violação deve ser implementada como um tratamento de erros específico do sistema no ambiente de execução do AUTOSAR. Pergunta Q-469e9abc947b9869 (aberta)
Simultaneidade: A função é classificada como não segura para threads (not thread-safe) [SWS_CORE_06228]. Portanto, o acesso concorrente ao mesmo objeto future sem sincronização externa é inadmissível.
Na interação com as demais funções do módulo core, existem as seguintes possibilidades:
Com o método seguro para threads is_ready, é possível consultar previamente se a operação foi concluída; ao retornar true, wait comprovadamente não bloqueará mais [SWS_CORE_06232].
Para evitar o bloqueio infinito, estão disponíveis as funções com limite de tempo wait_for com uma duração relativa [SWS_CORE_06229], bem como wait_until com um instante absoluto [SWS_CORE_06230].
Para a classe primária de template ara::core::Future, aplicam-se os mesmos requisitos de espera síncrona e restrições [SWS_CORE_00328].
Este texto foi curado por um sistema de IA e baseia-se exclusivamente na especificação AUTOSAR.
Wait for the given period, or until a value or an error is available. This function shall behave the same as the corresponding std::future function
GERADO POR IAnão revisadoModelo: gemini-3.8-flash-medium · Esforço: medium · Temperatura: não controlável · Prompt: 927a98d78cf3ProcedênciaPerguntas em aberto (1)
traduzido do guia alemãogemini-3.8-flash-low · 2026-10-13 · Original em alemão
O método wait_for da especialização ara::core::Future<void, E> bloqueia a thread chamadora de forma síncrona por um intervalo de tempo máximo timeoutDuration ou até que o resultado esteja disponível [SWS_CORE_06229]. Ele se comporta semanticamente como a função padrão correspondente std::future::wait_for[SWS_CORE_06229].
Como valor de retorno, a função fornece o status FutureStatus[SWS_CORE_06229]. Este sinaliza com FutureStatus::kReady que um valor ou um erro está disponível, ou com FutureStatus::kTimeout que o prazo expirou sem resultado [SWS_CORE_00361]. Um estado equivalente a std::future_status::deferred não está previsto [SWS_CORE_00361]. O comportamento corresponde à interface geral de Future [SWS_CORE_00329].
Para a chamada, aplicam-se as seguintes condições referentes a concorrência e tratamento de erros:
Concorrência: a função está especificada como não segura para threads (not thread-safe) [SWS_CORE_06229]. Chamadas simultâneas na mesma instância devem ser protegidas pelo lado chamador.
Casos de erro e segurança de exceções: a operação está declarada como segura contra exceções (exception safe) e noexcept[SWS_CORE_06229]. Se o objeto Future for inválido (valid() retorna false), ocorre uma FutureInvalidViolation[SWS_CORE_06229]. Devido à declaração noexcept, presume-se que essa violação provavelmente leve ao encerramento imediato do programa. Pergunta Q-4f01aa6e7fbfb12d (aberta)
Esta nota de utilização foi criada de forma automatizada com base na especificação da AUTOSAR Adaptive R25-11.
Wait until the given time, or until a value or an error is available. This function shall behave the same as the corresponding std::future function.
GERADO POR IAnão revisadoModelo: gemini-3.8-flash-medium · Esforço: medium · Temperatura: não controlável · Prompt: 932b0d674f17Procedência
traduzido do guia alemãogemini-3.8-flash-low · 2026-10-13 · Original em alemão
A função-membro wait_until da especialização ara::core::Future<void, E> bloqueia a thread chamadora até que o instante absoluto deadline especificado seja atingido ou até que um valor ou erro esteja disponível [SWS_CORE_06230]. A função apresenta o mesmo comportamento que a função padrão C++ correspondente std::future::wait_until[SWS_CORE_06230] e possui a mesma semântica que a sobrecarga genérica para ara::core::Future[SWS_CORE_00330].
O valor de retorno do tipo FutureStatus sinaliza se o prazo foi atingido ou se um valor está disponível [SWS_CORE_06230]. Aqui, o estado kReady indica que o estado compartilhado está pronto, enquanto kTimeout significa que o estado compartilhado não ficou pronto antes de o prazo expirar [SWS_CORE_00361]. Um estado análogo a std::future_status::deferred não existe em FutureStatus[SWS_CORE_00361].
No que se refere à execução e às condições de contorno, estão definidas as seguintes diretrizes:
Contexto de chamada e comportamento com exceções: a função está disponível por meio do arquivo de cabeçalho #include "ara/core/future.h", declarada como noexcept e especificada como segura contra exceções (exception safe) [SWS_CORE_06230].
Estados de erro: se o Future for inválido, ou seja, quando valid() retornar o valor false, ocorre a violação FutureInvalidViolation[SWS_CORE_06230].
Concorrência: a operação está classificada como não segura para threads (not thread-safe) [SWS_CORE_06230].
Esta nota de uso foi gerada automaticamente com base na especificação do AUTOSAR Adaptive R25-11.
gemini-3.8-flash-low· 2026-10-13 · Original em alemão