DEENESPTFRRUARHIKOZHNL

classe ara::core::Future< void, E >

[SWS_CORE_06221] Upstream: RS_AP_00130

template <typename E> class Future< void, E > final {...};

Specialization of class Future for "void" values. The implementation shall flag the condition: ( E != ara::core::ErrorCode ) as a compile error.

Header-Datei#include "ara/core/future.h"
Forwarding-Header#include "ara/core/core_fwd.h"
Scopenamespace ara::core

Guia do utilizadorGERADO POR IA

Permite aguardar a conclusão de uma operação assíncrona sem valor de retorno, bem como obter o status de erro.
GERADO POR IA não revisado Modelo: gemini-3.8-flash-medium · Esforço: medium · Temperatura: não controlável · Prompt: e943c154e07e Procedê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.

future_states Ungueltig Inválido (valid() == false) Ausstehend Válido / Pendente (valid() == true, is_ready() == false) Ungueltig->Ausstehend Move-Konstruktion / Zuweisung Ausstehend->Ungueltig then() Bereit Válido / Pronto (valid() == true, is_ready() == true) Ausstehend->Bereit Promise setzt Wert / Fehler Bereit->Ungueltig GetResult() / get() Bereit->Ungueltig then()

Diagrama de estados: transições de estado e validade de ara::core::Future<void, E>. Fontes: [SWS_CORE_06222], [SWS_CORE_06226], [SWS_CORE_06227], [SWS_CORE_06231], [SWS_CORE_06232], [SWS_CORE_06233], [SWS_CORE_06236]

Caminho de utilização

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].

Obtenção síncrona do resultado via GetResultAplicaçãoFutureSharedStatevalid()trueis_ready()Verificar statustrue (resultado ou erro pronto)trueGetResult()std::move(Ergebnis)Result<void, E>Tornar Shared State inválido (valid() == false)Result<void, E>

Diagrama de sequência: fluxo síncrono para consulta de resultado via GetResult. Fontes: [SWS_CORE_06227], [SWS_CORE_06228], [SWS_CORE_06232], [SWS_CORE_06236]

Cenários de erro

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.

Mapa de membros

Diagrama de classes

Hohle Dreieckspfeile = Vererbung (zeigt zur Basisklasse); Klicken öffnet die jeweilige Klassenseite.

G nara__core__Future__void__E__740 Future< void, E > + Future() + operator=() + ~Future() + GetResult() + get() + is_ready() + then() + valid() + wait() + wait_for() + wait_until()

Vista de detalhes

Selecione uma entrada no índice.

Construtores e destrutor

Future função 3

Default constructor This function shall behave the same as the corresponding std::future function. ≙ std::future

Sobrecargas Future 3
Future () noexcept; SWS_CORE_06222
Future (Future &&other) noexcept; SWS_CORE_06223
Future (const Future &other)=delete; SWS_CORE_06234
~Future função

Destructor for Future objects. Abandons any shared state

~Future () noexcept;

Métodos

get função

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

void get () noexcept(false);
GetResult função

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).

Result< void, E > GetResult () noexcept(std::is_nothrow_move_ constructible< E >::value);
is_ready função

Return whether the asynchronous operation has finished. If this function returns true, get(), Get Result() and the wait calls are guaranteed not to block.

bool is_ready () const noexcept;
then função 2

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_

Sobrecargas then 2
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
valid função

Checks if the Future is valid, i.e. if it has a shared state.

bool valid () const noexcept;
wait função

Wait for a value or an error to be available. This function shall behave the same as the corresponding std::future function ≙ std::future

void wait () const noexcept;
wait_for função

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

template <typename Rep, typename Period> FutureStatus wait_for (const std::chrono::duration< Rep, Period > &timeoutDuration) const noexcept;
wait_until função

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

template <typename Clock, typename Duration> FutureStatus wait_until (const std::chrono::time_point< Clock, Duration > &deadline) const noexcept;

Operadores

operator= função 2

Move assign from another instance. This function shall behave the same as the corresponding std::future function. ≙ std::future

Sobrecargas = 2
Future & operator= (Future &&other) noexcept; SWS_CORE_06225
Future & operator= (const Future &other)=delete; SWS_CORE_06235

Documentação dos métodos

função Future [SWS_CORE_06222] Upstream: RS_AP_00130

Future () noexcept;

Default constructor This function shall behave the same as the corresponding std::future function.

Header-Datei#include "ara/core/future.h"
Scopeclass ara::core::Future< void, E >
Exception-Sicherheitexception safe
Thread-Sicherheitthread-safe

Request a governed re-review of this record. The record is not changed immediately.

Record
AUTOSAR/AP/record/SWS_CORE_06222
Status
valid/unmigrated
Version
AUTOSAR/AP/record/SWS_CORE_06222@rel:R25-11#29f43998
Content hash
29f43998
Source
https://www.autosar.org/fileadmin/standards/R25-11/AP/AUTOSAR_AP_SWS_Core.pdf#nameddest=SWS_CORE_06222
Status: valid/unmigrated Version: rel:R25-11#5a060501 Versionshistorie & Revisions (1 transition, 8 revision)
Current State
valid/unmigrated
Reason
mechanically backfilled by migriere_status_backfill.py -- no per-field curation history exists yet for this record
Campaign
2026-08-13-status-backfill
Active Version
AUTOSAR/AP/record/SWS_CORE_06222@rel:R25-11#5a060501
Point-in-Time History:
Recorded Revisions (8):
  • R25-11rel:R25-11#1afcba652026-09-30
  • R19-11rel:R19-11#0daa41512026-10-14
  • R20-11rel:R20-11#2b96cd1f2026-10-14
  • R21-11rel:R21-11#2b96cd1f2026-10-14
  • R22-11rel:R22-11#769923512026-10-14
  • R23-11rel:R23-11#5dfa683d2026-10-14
  • R24-11rel:R24-11#5c2585642026-10-14
  • R25-11rel:R25-11#5a0605012026-10-14 active
DateActorTransitionReason / RationaleCampaign
2026-08-13toolnone → valid/unmigratedmechanically backfilled by migriere_status_backfill.py -- no per-field curation history exists yet for this record2026-08-13-status-backfill

função Future [SWS_CORE_06223] Upstream: RS_AP_00130

Future (Future &&other) noexcept;

Move constructor from another instance This function shall behave the same as the corresponding std::future function.

Header-Datei#include "ara/core/future.h"
Scopeclass ara::core::Future< void, E >
Exception-Sicherheitexception safe
Thread-Sicherheitnot thread-safe

Parameter (in)

ParameterBeschreibung
otherthe other instance

Request a governed re-review of this record. The record is not changed immediately.

Record
AUTOSAR/AP/record/SWS_CORE_06223
Status
valid/unmigrated
Version
AUTOSAR/AP/record/SWS_CORE_06223@rel:R25-11#771e45e3
Content hash
771e45e3
Source
https://www.autosar.org/fileadmin/standards/R25-11/AP/AUTOSAR_AP_SWS_Core.pdf#nameddest=SWS_CORE_06223
Status: valid/unmigrated Version: rel:R25-11#d8ab302b Versionshistorie & Revisions (1 transition, 8 revision)
Current State
valid/unmigrated
Reason
mechanically backfilled by migriere_status_backfill.py -- no per-field curation history exists yet for this record
Campaign
2026-08-13-status-backfill
Active Version
AUTOSAR/AP/record/SWS_CORE_06223@rel:R25-11#d8ab302b
Point-in-Time History:
Recorded Revisions (8):
  • R25-11rel:R25-11#c4ca9e912026-09-30
  • R19-11rel:R19-11#a14b593d2026-10-14
  • R20-11rel:R20-11#29b853f02026-10-14
  • R21-11rel:R21-11#29b853f02026-10-14
  • R22-11rel:R22-11#0b366b7e2026-10-14
  • R23-11rel:R23-11#4e1158ee2026-10-14
  • R24-11rel:R24-11#43ec03e42026-10-14
  • R25-11rel:R25-11#d8ab302b2026-10-14 active
DateActorTransitionReason / RationaleCampaign
2026-08-13toolnone → valid/unmigratedmechanically backfilled by migriere_status_backfill.py -- no per-field curation history exists yet for this record2026-08-13-status-backfill

função Future [SWS_CORE_06234] Upstream: RS_AP_00130

Future (const Future &other)=delete;

Copy constructor shall be disabled

Header-Datei#include "ara/core/future.h"
Scopeclass ara::core::Future< void, E >

Request a governed re-review of this record. The record is not changed immediately.

Record
AUTOSAR/AP/record/SWS_CORE_06234
Status
valid/unmigrated
Version
AUTOSAR/AP/record/SWS_CORE_06234@rel:R25-11#1269398e
Content hash
1269398e
Source
https://www.autosar.org/fileadmin/standards/R25-11/AP/AUTOSAR_AP_SWS_Core.pdf#nameddest=SWS_CORE_06234
Status: valid/unmigrated Version: rel:R25-11#56462c5d Versionshistorie & Revisions (1 transition, 8 revision)
Current State
valid/unmigrated
Reason
mechanically backfilled by migriere_status_backfill.py -- no per-field curation history exists yet for this record
Campaign
2026-08-13-status-backfill
Active Version
AUTOSAR/AP/record/SWS_CORE_06234@rel:R25-11#56462c5d
Point-in-Time History:
Recorded Revisions (8):
  • R25-11rel:R25-11#f81e62902026-09-30
  • R19-11rel:R19-11#544640f62026-10-14
  • R20-11rel:R20-11#d96a22e02026-10-14
  • R21-11rel:R21-11#ea4dbae52026-10-14
  • R22-11rel:R22-11#302289e52026-10-14
  • R23-11rel:R23-11#8c086a182026-10-14
  • R24-11rel:R24-11#7c2e887e2026-10-14
  • R25-11rel:R25-11#56462c5d2026-10-14 active
DateActorTransitionReason / RationaleCampaign
2026-08-13toolnone → valid/unmigratedmechanically backfilled by migriere_status_backfill.py -- no per-field curation history exists yet for this record2026-08-13-status-backfill

função GetResult [SWS_CORE_06236] Upstream: RS_AP_00130

Result< void, E > GetResult () noexcept(std::is_nothrow_move_ constructible< E >::value);

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).

Header-Datei#include "ara/core/future.h"
Scopeclass ara::core::Future< void, E >
Exception-Sicherheitconditionally exception safe
Thread-Sicherheitnot thread-safe
Verletzungen (Violations)FutureInvalidVio- If the Future is invalid ( valid ==FALSE ) lation

Rückgabewert

TypBeschreibung
Result< void, E >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]

Fehler

FehlercodeBeschreibung
FutureErrc::kBrokenPromiserollback_semantics if the Promise was broken, meaning the shared state was abandoned by the corresponding Promise.

Request a governed re-review of this record. The record is not changed immediately.

Record
AUTOSAR/AP/record/SWS_CORE_06236
Status
valid/unmigrated
Version
AUTOSAR/AP/record/SWS_CORE_06236@rel:R25-11#362d5a36
Content hash
362d5a36
Source
https://www.autosar.org/fileadmin/standards/R25-11/AP/AUTOSAR_AP_SWS_Core.pdf#nameddest=SWS_CORE_06236
Status: valid/unmigrated Version: rel:R25-11#932914cb Versionshistorie & Revisions (1 transition, 8 revision)
Current State
valid/unmigrated
Reason
mechanically backfilled by migriere_status_backfill.py -- no per-field curation history exists yet for this record
Campaign
2026-08-13-status-backfill
Active Version
AUTOSAR/AP/record/SWS_CORE_06236@rel:R25-11#932914cb
Point-in-Time History:
Recorded Revisions (8):
  • R25-11rel:R25-11#7184bdc92026-09-30
  • R19-11rel:R19-11#541daac72026-10-14
  • R20-11rel:R20-11#3adb03532026-10-14
  • R21-11rel:R21-11#3adb03532026-10-14
  • R22-11rel:R22-11#4366d27f2026-10-14
  • R23-11rel:R23-11#f033d7132026-10-14
  • R24-11rel:R24-11#243860772026-10-14
  • R25-11rel:R25-11#932914cb2026-10-14 active
DateActorTransitionReason / RationaleCampaign
2026-08-13toolnone → valid/unmigratedmechanically backfilled by migriere_status_backfill.py -- no per-field curation history exists yet for this record2026-08-13-status-backfill

função get [SWS_CORE_06226] Upstream: RS_AP_00130

void get () noexcept(false);

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 IA não revisado Modelo: gemini-3.8-flash-medium · Esforço: medium · Temperatura: não controlável · Prompt: 195e9e272b48 Procedê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.

Header-Datei#include "ara/core/future.h"
Scopeclass ara::core::Future< void, E >
Exception-Sicherheitnot exception safe
Thread-Sicherheitnot thread-safe

Rückgabewert

TypBeschreibung
None

Exceptions

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.

Record
AUTOSAR/AP/record/SWS_CORE_06226
Status
valid/unmigrated
Version
AUTOSAR/AP/record/SWS_CORE_06226@rel:R25-11#c49e65d5
Content hash
c49e65d5
Source
https://www.autosar.org/fileadmin/standards/R25-11/AP/AUTOSAR_AP_SWS_Core.pdf#nameddest=SWS_CORE_06226
Status: valid/unmigrated Version: rel:R25-11#6ad2ffae Versionshistorie & Revisions (1 transition, 8 revision)
Current State
valid/unmigrated
Reason
mechanically backfilled by migriere_status_backfill.py -- no per-field curation history exists yet for this record
Campaign
2026-08-13-status-backfill
Active Version
AUTOSAR/AP/record/SWS_CORE_06226@rel:R25-11#6ad2ffae
Point-in-Time History:
Recorded Revisions (8):
  • R25-11rel:R25-11#40fe52062026-09-30
  • R19-11rel:R19-11#877183822026-10-14
  • R20-11rel:R20-11#561b11012026-10-14
  • R21-11rel:R21-11#cd0d4bbb2026-10-14
  • R22-11rel:R22-11#41a0b49a2026-10-14
  • R23-11rel:R23-11#2c6048102026-10-14
  • R24-11rel:R24-11#2f0d210c2026-10-14
  • R25-11rel:R25-11#6ad2ffae2026-10-14 active
DateActorTransitionReason / RationaleCampaign
2026-08-13toolnone → valid/unmigratedmechanically backfilled by migriere_status_backfill.py -- no per-field curation history exists yet for this record2026-08-13-status-backfill

função is_ready [SWS_CORE_06232] Upstream: RS_AP_00130

bool is_ready () const noexcept;

Return whether the asynchronous operation has finished. If this function returns true, get(), Get Result() and the wait calls are guaranteed not to block.

Header-Datei#include "ara/core/future.h"
Scopeclass ara::core::Future< void, E >
Exception-Sicherheitexception safe
Thread-Sicherheitthread-safe
Verletzungen (Violations)FutureInvalidVio- If the Future is invalid (valid returns false) lation

Rückgabewert

TypBeschreibung
booltrue if the Future contains a value or an error, false otherwise

Request a governed re-review of this record. The record is not changed immediately.

Record
AUTOSAR/AP/record/SWS_CORE_06232
Status
valid/unmigrated
Version
AUTOSAR/AP/record/SWS_CORE_06232@rel:R25-11#21ae1e4b
Content hash
21ae1e4b
Source
https://www.autosar.org/fileadmin/standards/R25-11/AP/AUTOSAR_AP_SWS_Core.pdf#nameddest=SWS_CORE_06232
Status: valid/unmigrated Version: rel:R25-11#5186dad5 Versionshistorie & Revisions (1 transition, 8 revision)
Current State
valid/unmigrated
Reason
mechanically backfilled by migriere_status_backfill.py -- no per-field curation history exists yet for this record
Campaign
2026-08-13-status-backfill
Active Version
AUTOSAR/AP/record/SWS_CORE_06232@rel:R25-11#5186dad5
Point-in-Time History:
Recorded Revisions (8):
  • R25-11rel:R25-11#4784afca2026-09-30
  • R19-11rel:R19-11#b80f30db2026-10-14
  • R20-11rel:R20-11#e1d9ba9b2026-10-14
  • R21-11rel:R21-11#6a9c97832026-10-14
  • R22-11rel:R22-11#d2f71e3d2026-10-14
  • R23-11rel:R23-11#26d4877a2026-10-14
  • R24-11rel:R24-11#7af5dd2e2026-10-14
  • R25-11rel:R25-11#5186dad52026-10-14 active
DateActorTransitionReason / RationaleCampaign
2026-08-13toolnone → valid/unmigratedmechanically backfilled by migriere_status_backfill.py -- no per-field curation history exists yet for this record2026-08-13-status-backfill

função operator= [SWS_CORE_06225] Upstream: RS_AP_00130

Future & operator= (Future &&other) noexcept;

Move assign from another instance. This function shall behave the same as the corresponding std::future function.

Header-Datei#include "ara/core/future.h"
Scopeclass ara::core::Future< void, E >
Exception-Sicherheitexception safe
Thread-Sicherheitnot thread-safe

Parameter (in)

ParameterBeschreibung
otherthe other instance

Rückgabewert

TypBeschreibung
Future &*this

Request a governed re-review of this record. The record is not changed immediately.

Record
AUTOSAR/AP/record/SWS_CORE_06225
Status
valid/unmigrated
Version
AUTOSAR/AP/record/SWS_CORE_06225@rel:R25-11#0628106b
Content hash
0628106b
Source
https://www.autosar.org/fileadmin/standards/R25-11/AP/AUTOSAR_AP_SWS_Core.pdf#nameddest=SWS_CORE_06225
Status: valid/unmigrated Version: rel:R25-11#9232ee22 Versionshistorie & Revisions (1 transition, 8 revision)
Current State
valid/unmigrated
Reason
mechanically backfilled by migriere_status_backfill.py -- no per-field curation history exists yet for this record
Campaign
2026-08-13-status-backfill
Active Version
AUTOSAR/AP/record/SWS_CORE_06225@rel:R25-11#9232ee22
Point-in-Time History:
Recorded Revisions (8):
  • R25-11rel:R25-11#354308df2026-09-30
  • R19-11rel:R19-11#7ddd3a9d2026-10-14
  • R20-11rel:R20-11#309f3c9c2026-10-14
  • R21-11rel:R21-11#8d4849c42026-10-14
  • R22-11rel:R22-11#9833c73f2026-10-14
  • R23-11rel:R23-11#b37e21992026-10-14
  • R24-11rel:R24-11#9232ee222026-10-14
  • R25-11rel:R25-11#9232ee222026-10-14 active
DateActorTransitionReason / RationaleCampaign
2026-08-13toolnone → valid/unmigratedmechanically backfilled by migriere_status_backfill.py -- no per-field curation history exists yet for this record2026-08-13-status-backfill

função operator= [SWS_CORE_06235] Upstream: RS_AP_00130

Future & operator= (const Future &other)=delete;

Copy assignment operator shall be disabled

Header-Datei#include "ara/core/future.h"
Scopeclass ara::core::Future< void, E >

Request a governed re-review of this record. The record is not changed immediately.

Record
AUTOSAR/AP/record/SWS_CORE_06235
Status
valid/unmigrated
Version
AUTOSAR/AP/record/SWS_CORE_06235@rel:R25-11#591ec064
Content hash
591ec064
Source
https://www.autosar.org/fileadmin/standards/R25-11/AP/AUTOSAR_AP_SWS_Core.pdf#nameddest=SWS_CORE_06235
Status: valid/unmigrated Version: rel:R25-11#2ab3479c Versionshistorie & Revisions (1 transition, 8 revision)
Current State
valid/unmigrated
Reason
mechanically backfilled by migriere_status_backfill.py -- no per-field curation history exists yet for this record
Campaign
2026-08-13-status-backfill
Active Version
AUTOSAR/AP/record/SWS_CORE_06235@rel:R25-11#2ab3479c
Point-in-Time History:
Recorded Revisions (8):
  • R25-11rel:R25-11#7aa2f7952026-09-30
  • R19-11rel:R19-11#e583d7bd2026-10-14
  • R20-11rel:R20-11#d21de51e2026-10-14
  • R21-11rel:R21-11#d21de51e2026-10-14
  • R22-11rel:R22-11#31fde6ef2026-10-14
  • R23-11rel:R23-11#de56c2ed2026-10-14
  • R24-11rel:R24-11#fd4c55142026-10-14
  • R25-11rel:R25-11#2ab3479c2026-10-14 active
DateActorTransitionReason / RationaleCampaign
2026-08-13toolnone → valid/unmigratedmechanically backfilled by migriere_status_backfill.py -- no per-field curation history exists yet for this record2026-08-13-status-backfill

função then [SWS_CORE_06231] Upstream: RS_AP_00130

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 IA não revisado Modelo: gemini-3.8-flash-medium · Esforço: medium · Temperatura: não controlável · Prompt: 161f9bad96ab Procedê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.

Header-Datei#include "ara/core/future.h"
Scopeclass ara::core::Future< void, E >
Exception-Sicherheitexception safe
Thread-Sicherheitnot thread-safe
Verletzungen (Violations)FutureInvalidVio- If the Future is invalid (valid returns false) lation FutureContinua- If the continuation throws an exception tionHasThrownVio- lation

Parameter (in)

ParameterBeschreibung
funca callable to register

Rückgabewert

TypBeschreibung
Future< <see below> >a new Future instance for the result of the continuation

Fehler

FehlercodeBeschreibung
This function does not specify any standardized errors.

Request a governed re-review of this record. The record is not changed immediately.

Record
AUTOSAR/AP/record/SWS_CORE_06231
Status
valid/unmigrated
Version
AUTOSAR/AP/record/SWS_CORE_06231@rel:R25-11#fe0f5640
Content hash
fe0f5640
Source
https://www.autosar.org/fileadmin/standards/R25-11/AP/AUTOSAR_AP_SWS_Core.pdf#nameddest=SWS_CORE_06231
Status: valid/unmigrated Version: rel:R25-11#21619af0 Versionshistorie & Revisions (1 transition, 8 revision)
Current State
valid/unmigrated
Reason
mechanically backfilled by migriere_status_backfill.py -- no per-field curation history exists yet for this record
Campaign
2026-08-13-status-backfill
Active Version
AUTOSAR/AP/record/SWS_CORE_06231@rel:R25-11#21619af0
Point-in-Time History:
Recorded Revisions (8):
  • R25-11rel:R25-11#9e67efce2026-09-30
  • R19-11rel:R19-11#b5665d0f2026-10-14
  • R20-11rel:R20-11#0cd22f812026-10-14
  • R21-11rel:R21-11#f603398f2026-10-14
  • R22-11rel:R22-11#b27b86212026-10-14
  • R23-11rel:R23-11#2173d0cf2026-10-14
  • R24-11rel:R24-11#273db5c82026-10-14
  • R25-11rel:R25-11#21619af02026-10-14 active
DateActorTransitionReason / RationaleCampaign
2026-08-13toolnone → valid/unmigratedmechanically backfilled by migriere_status_backfill.py -- no per-field curation history exists yet for this record2026-08-13-status-backfill

função then [SWS_CORE_06237] Upstream: RS_AP_00130

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 IA não revisado Modelo: gemini-3.8-flash-medium · Esforço: medium · Temperatura: não controlável · Prompt: 96d3b0e93b60 Procedê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.

Header-Datei#include "ara/core/future.h"
Scopeclass ara::core::Future< void, E >
Exception-Sicherheitexception safe
Thread-Sicherheitnot thread-safe
Verletzungen (Violations)FutureInvalidVio- If the Future is invalid (valid returns false) lation FutureContinua- If the continuation throws an exception. tionHasThrownVio- lation

Template-Parameter

ParameterBeschreibung
FExecutorTthe type of the func argument the type of the executor argument

Parameter (in)

ParameterBeschreibung
funca callable to register
executorthe execution context in which to execute the Callable func

Rückgabewert

TypBeschreibung
Future< <see below> >a new Future instance for the result of the continuation

Fehler

FehlercodeBeschreibung
This function does not specify any standardized errors.

Request a governed re-review of this record. The record is not changed immediately.

Record
AUTOSAR/AP/record/SWS_CORE_06237
Status
valid/unmigrated
Version
AUTOSAR/AP/record/SWS_CORE_06237@rel:R25-11#1a4cd92d
Content hash
1a4cd92d
Source
https://www.autosar.org/fileadmin/standards/R25-11/AP/AUTOSAR_AP_SWS_Core.pdf#nameddest=SWS_CORE_06237
Status: valid/unmigrated Version: rel:R25-11#58e4cf50 Versionshistorie & Revisions (1 transition, 7 revision)
Current State
valid/unmigrated
Reason
mechanically backfilled by migriere_status_backfill.py -- no per-field curation history exists yet for this record
Campaign
2026-08-13-status-backfill
Active Version
AUTOSAR/AP/record/SWS_CORE_06237@rel:R25-11#58e4cf50
Point-in-Time History:
Recorded Revisions (7):
  • R25-11rel:R25-11#e39189402026-09-30
  • R20-11rel:R20-11#5e1b7f5b2026-10-14
  • R21-11rel:R21-11#1e3cbb002026-10-14
  • R22-11rel:R22-11#e2d3ef1a2026-10-14
  • R23-11rel:R23-11#8b2f870e2026-10-14
  • R24-11rel:R24-11#27088c392026-10-14
  • R25-11rel:R25-11#58e4cf502026-10-14 active
DateActorTransitionReason / RationaleCampaign
2026-08-13toolnone → valid/unmigratedmechanically backfilled by migriere_status_backfill.py -- no per-field curation history exists yet for this record2026-08-13-status-backfill

função valid [SWS_CORE_06227] Upstream: RS_AP_00130

bool valid () const noexcept;

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 IA não revisado Modelo: gemini-3.8-flash-medium · Esforço: medium · Temperatura: não controlável · Prompt: 480112e5c811 Procedê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.

Guia do implementador em breve (complexidade I1)

Header-Datei#include "ara/core/future.h"
Scopeclass ara::core::Future< void, E >
Exception-Sicherheitexception safe
Thread-Sicherheitthread-safe

Rückgabewert

TypBeschreibung
bool• TRUE: the Future is usable • FALSE: the Future is NOT usable

Request a governed re-review of this record. The record is not changed immediately.

Record
AUTOSAR/AP/record/SWS_CORE_06227
Status
valid/unmigrated
Version
AUTOSAR/AP/record/SWS_CORE_06227@rel:R25-11#c60f2d07
Content hash
c60f2d07
Source
https://www.autosar.org/fileadmin/standards/R25-11/AP/AUTOSAR_AP_SWS_Core.pdf#nameddest=SWS_CORE_06227
Status: valid/unmigrated Version: rel:R25-11#d38a60b4 Versionshistorie & Revisions (1 transition, 8 revision)
Current State
valid/unmigrated
Reason
mechanically backfilled by migriere_status_backfill.py -- no per-field curation history exists yet for this record
Campaign
2026-08-13-status-backfill
Active Version
AUTOSAR/AP/record/SWS_CORE_06227@rel:R25-11#d38a60b4
Point-in-Time History:
Recorded Revisions (8):
  • R25-11rel:R25-11#285420912026-09-30
  • R19-11rel:R19-11#2199fb4c2026-10-14
  • R20-11rel:R20-11#7a68b03e2026-10-14
  • R21-11rel:R21-11#a46ad2562026-10-14
  • R22-11rel:R22-11#6bc04f322026-10-14
  • R23-11rel:R23-11#bd2577342026-10-14
  • R24-11rel:R24-11#2f9de2d02026-10-14
  • R25-11rel:R25-11#d38a60b42026-10-14 active
DateActorTransitionReason / RationaleCampaign
2026-08-13toolnone → valid/unmigratedmechanically backfilled by migriere_status_backfill.py -- no per-field curation history exists yet for this record2026-08-13-status-backfill

função wait [SWS_CORE_06228] Upstream: RS_AP_00130

void wait () const noexcept;

Wait for a value or an error to be available. This function shall behave the same as the corresponding std::future function

GERADO POR IA não revisado Modelo: gemini-3.8-flash-medium · Esforço: medium · Temperatura: não controlável · Prompt: 2f9ee5ecd1d4 Procedência Perguntas 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.

Header-Datei#include "ara/core/future.h"
Scopeclass ara::core::Future< void, E >
Exception-Sicherheitexception safe
Thread-Sicherheitnot thread-safe
Verletzungen (Violations)FutureInvalidVio- If the Future is invalid (valid returns false) lation

Rückgabewert

TypBeschreibung
None

Request a governed re-review of this record. The record is not changed immediately.

Record
AUTOSAR/AP/record/SWS_CORE_06228
Status
valid/unmigrated
Version
AUTOSAR/AP/record/SWS_CORE_06228@rel:R25-11#f1683bdc
Content hash
f1683bdc
Source
https://www.autosar.org/fileadmin/standards/R25-11/AP/AUTOSAR_AP_SWS_Core.pdf#nameddest=SWS_CORE_06228
Status: valid/unmigrated Version: rel:R25-11#24670f02 Versionshistorie & Revisions (1 transition, 8 revision)
Current State
valid/unmigrated
Reason
mechanically backfilled by migriere_status_backfill.py -- no per-field curation history exists yet for this record
Campaign
2026-08-13-status-backfill
Active Version
AUTOSAR/AP/record/SWS_CORE_06228@rel:R25-11#24670f02
Point-in-Time History:
Recorded Revisions (8):
  • R25-11rel:R25-11#a06c2ef52026-09-30
  • R19-11rel:R19-11#4b7a7a422026-10-14
  • R20-11rel:R20-11#457c63ae2026-10-14
  • R21-11rel:R21-11#6b136de32026-10-14
  • R22-11rel:R22-11#3d7c381b2026-10-14
  • R23-11rel:R23-11#d02a0b222026-10-14
  • R24-11rel:R24-11#a383ce752026-10-14
  • R25-11rel:R25-11#24670f022026-10-14 active
DateActorTransitionReason / RationaleCampaign
2026-08-13toolnone → valid/unmigratedmechanically backfilled by migriere_status_backfill.py -- no per-field curation history exists yet for this record2026-08-13-status-backfill

função wait_for [SWS_CORE_06229] Upstream: RS_AP_00130

template <typename Rep, typename Period> FutureStatus wait_for (const std::chrono::duration< Rep, Period > &timeoutDuration) const noexcept;

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 IA não revisado Modelo: gemini-3.8-flash-medium · Esforço: medium · Temperatura: não controlável · Prompt: 927a98d78cf3 Procedência Perguntas 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.

Guia do implementador em breve (complexidade I1)

Header-Datei#include "ara/core/future.h"
Scopeclass ara::core::Future< void, E >
Exception-Sicherheitexception safe
Thread-Sicherheitnot thread-safe
Verletzungen (Violations)FutureInvalidVio- If the Future is invalid (valid returns false) lation

Parameter (in)

ParameterBeschreibung
timeoutDurationmaximal duration to wait for

Rückgabewert

TypBeschreibung
FutureStatusstatus that indicates whether the timeout hit or if a value is available

Request a governed re-review of this record. The record is not changed immediately.

Record
AUTOSAR/AP/record/SWS_CORE_06229
Status
valid/unmigrated
Version
AUTOSAR/AP/record/SWS_CORE_06229@rel:R25-11#4e7f2aeb
Content hash
4e7f2aeb
Source
https://www.autosar.org/fileadmin/standards/R25-11/AP/AUTOSAR_AP_SWS_Core.pdf#nameddest=SWS_CORE_06229
Status: valid/unmigrated Version: rel:R25-11#cde767bb Versionshistorie & Revisions (1 transition, 8 revision)
Current State
valid/unmigrated
Reason
mechanically backfilled by migriere_status_backfill.py -- no per-field curation history exists yet for this record
Campaign
2026-08-13-status-backfill
Active Version
AUTOSAR/AP/record/SWS_CORE_06229@rel:R25-11#cde767bb
Point-in-Time History:
Recorded Revisions (8):
  • R25-11rel:R25-11#414f595f2026-09-30
  • R19-11rel:R19-11#8d512e042026-10-14
  • R20-11rel:R20-11#f89ce5282026-10-14
  • R21-11rel:R21-11#f89ce5282026-10-14
  • R22-11rel:R22-11#68d81b0f2026-10-14
  • R23-11rel:R23-11#534174642026-10-14
  • R24-11rel:R24-11#38872d6e2026-10-14
  • R25-11rel:R25-11#cde767bb2026-10-14 active
DateActorTransitionReason / RationaleCampaign
2026-08-13toolnone → valid/unmigratedmechanically backfilled by migriere_status_backfill.py -- no per-field curation history exists yet for this record2026-08-13-status-backfill

função wait_until [SWS_CORE_06230] Upstream: RS_AP_00130

template <typename Clock, typename Duration> FutureStatus wait_until (const std::chrono::time_point< Clock, Duration > &deadline) const noexcept;

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 IA não revisado Modelo: gemini-3.8-flash-medium · Esforço: medium · Temperatura: não controlável · Prompt: 932b0d674f17 Procedê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.

Guia do implementador em breve (complexidade I1)

Header-Datei#include "ara/core/future.h"
Scopeclass ara::core::Future< void, E >
Exception-Sicherheitexception safe
Thread-Sicherheitnot thread-safe
Verletzungen (Violations)FutureInvalidVio- If the Future is invalid (valid returns false) lation

Parameter (in)

ParameterBeschreibung
deadlinelatest point in time to wait

Rückgabewert

TypBeschreibung
FutureStatusstatus that indicates whether the time was reached or if a value is available

Request a governed re-review of this record. The record is not changed immediately.

Record
AUTOSAR/AP/record/SWS_CORE_06230
Status
valid/unmigrated
Version
AUTOSAR/AP/record/SWS_CORE_06230@rel:R25-11#4ca7a5f6
Content hash
4ca7a5f6
Source
https://www.autosar.org/fileadmin/standards/R25-11/AP/AUTOSAR_AP_SWS_Core.pdf#nameddest=SWS_CORE_06230
Status: valid/unmigrated Version: rel:R25-11#f458c628 Versionshistorie & Revisions (1 transition, 8 revision)
Current State
valid/unmigrated
Reason
mechanically backfilled by migriere_status_backfill.py -- no per-field curation history exists yet for this record
Campaign
2026-08-13-status-backfill
Active Version
AUTOSAR/AP/record/SWS_CORE_06230@rel:R25-11#f458c628
Point-in-Time History:
Recorded Revisions (8):
  • R25-11rel:R25-11#eec83ed82026-09-30
  • R19-11rel:R19-11#73333c762026-10-14
  • R20-11rel:R20-11#291da1182026-10-14
  • R21-11rel:R21-11#cb6c719b2026-10-14
  • R22-11rel:R22-11#31de44c72026-10-14
  • R23-11rel:R23-11#944875602026-10-14
  • R24-11rel:R24-11#85fe57402026-10-14
  • R25-11rel:R25-11#f458c6282026-10-14 active
DateActorTransitionReason / RationaleCampaign
2026-08-13toolnone → valid/unmigratedmechanically backfilled by migriere_status_backfill.py -- no per-field curation history exists yet for this record2026-08-13-status-backfill

função ~Future [SWS_CORE_06233] Upstream: RS_AP_00130

~Future () noexcept;

Destructor for Future objects. Abandons any shared state

Header-Datei#include "ara/core/future.h"
Scopeclass ara::core::Future< void, E >
Exception-Sicherheitexception safe
Thread-Sicherheitthread-safe

Request a governed re-review of this record. The record is not changed immediately.

Record
AUTOSAR/AP/record/SWS_CORE_06233
Status
valid/unmigrated
Version
AUTOSAR/AP/record/SWS_CORE_06233@rel:R25-11#daa34d89
Content hash
daa34d89
Source
https://www.autosar.org/fileadmin/standards/R25-11/AP/AUTOSAR_AP_SWS_Core.pdf#nameddest=SWS_CORE_06233
Status: valid/unmigrated Version: rel:R25-11#7ce4899e Versionshistorie & Revisions (1 transition, 8 revision)
Current State
valid/unmigrated
Reason
mechanically backfilled by migriere_status_backfill.py -- no per-field curation history exists yet for this record
Campaign
2026-08-13-status-backfill
Active Version
AUTOSAR/AP/record/SWS_CORE_06233@rel:R25-11#7ce4899e
Point-in-Time History:
Recorded Revisions (8):
  • R25-11rel:R25-11#32a6e0a42026-09-30
  • R19-11rel:R19-11#e8e5d2942026-10-14
  • R20-11rel:R20-11#feb4e8682026-10-14
  • R21-11rel:R21-11#a081de932026-10-14
  • R22-11rel:R22-11#40dcc5802026-10-14
  • R23-11rel:R23-11#8b89d85f2026-10-14
  • R24-11rel:R24-11#25b460852026-10-14
  • R25-11rel:R25-11#7ce4899e2026-10-14 active
DateActorTransitionReason / RationaleCampaign
2026-08-13toolnone → valid/unmigratedmechanically backfilled by migriere_status_backfill.py -- no per-field curation history exists yet for this record2026-08-13-status-backfill