DEENESPTFRRUARHIKOZHNL

clase ara::core::Future

[SWS_CORE_00321] Upstream: RS_AP_00130

template <typename T, typename E = ErrorCode> class Future final {...};

Implementation of std::future from [future.syn] in [11]. The implementation shall flag the condition E != ara::core::ErrorCode as a compile error.

Literaturverzeichnis SWS Core: [11] ISO/IEC 14882:2017, Programming languages – C++ – www.iso.org

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

Guía del usuarioGENERADO POR IA

Permite la recepción síncrona o asíncrona de valores y errores procedentes de una operación concurrente.
GENERADO POR IA no revisado Modelo: gemini-3.8-flash-medium · Esfuerzo: medium · Temperatura: no controlable · Prompt: fbd974cb6be2 Procedencia Preguntas abiertas (1)
traducido de la guía alemanagemini-3.8-flash-low · 2026-10-13 · Original en alemán

Permite la recepción síncrona o asíncrona de valores y errores procedentes de una operación concurrente.

La clase ara::core::Future sirve como identificador receptor para el resultado de una operación asíncrona y administra el acceso a un estado compartido [SWS_CORE_00327]. Los consumidores pueden comprobar el estado de forma no bloqueante, esperar de forma síncrona a la finalización o recibir el resultado a través de GetResult() libre de excepciones como ara::core::Result [SWS_CORE_00336]. Dado que las operaciones de copia están eliminadas, la propiedad se gestiona de forma exclusiva y, tras la recogida del resultado o su reenvío mediante una continuación, el objeto pasa a ser inválido de inmediato.

Contexto

La clase plantilla ara::core::Future representa el elemento final receptor para los resultados de operaciones asíncronas dentro de la AUTOSAR Adaptive Platform. Permite el acceso controlado a un estado compartido (Shared State) que una instancia generadora rellena de forma asíncrona [SWS_CORE_00327]. Conceptualmente, la clase implementa std::future del estándar C++17 ISO/IEC 14882:2017 [11], pero se integra a la perfección en el concepto basado en excepciones de error de la plataforma: para el parámetro de plantilla E se prescribe obligatoriamente el tipo de error ara::core::ErrorCode; cualquier especificación divergente da lugar a un error de compilación. Entre los interlocutores principales se encuentran el generador asíncrono (como una promesa asociada), que proporciona el valor o el error, la instancia de Future como receptor exclusivo, así como un consumidor o contexto de ejecución (ExecutorT) al que se transfieren las tareas posteriores [SWS_CORE_00331] [SWS_CORE_00337].

Ciclo de vida

La creación, gestión de estado y destrucción de ara::core::Future están sujetas a reglas estrictas para garantizar relaciones de propiedad deterministas:

future_lifecycle Invalid Ungueltig (valid() == false) ValidPending Gueltig / Ausstehend (valid() == true, is_ready() == false) Invalid->ValidPending Move-Zuweisung / Erhalt ValidPending->Invalid Destruktor / then() ValidReady Gueltig / Bereit (valid() == true, is_ready() == true) ValidPending->ValidReady Promise establece el valor o el error ValidReady->Invalid GetResult() / get() / then()

Diagrama de estados: Ciclo de vida y transiciones de estado de una instancia de Future respecto a la validez y disponibilidad del Shared State. Fuentes: [SWS_CORE_00322], [SWS_CORE_00326], [SWS_CORE_00327], [SWS_CORE_00331], [SWS_CORE_00332], [SWS_CORE_00333], [SWS_CORE_00336]

Ruta de uso

Una ruta de uso típica para el procesamiento de resultados se divide en las siguientes fases:

  1. Comprobación de estado y sincronización: Con is_ready() se puede determinar previamente si el resultado asíncrono ya está disponible [SWS_CORE_00332]. Si este es el caso, se garantiza que las consultas posteriores ya no se bloquearán [SWS_CORE_00332]. De lo contrario, se puede sincronizar de forma indefinida con wait() [SWS_CORE_00328] o con límite de tiempo mediante wait_for() o wait_until() [SWS_CORE_00329] [SWS_CORE_00330].
  2. Extracción del resultado: En aplicaciones de AUTOSAR Adaptive, la llamada a GetResult() es determinante: el método se bloquea si es necesario, pero nunca lanza excepciones y transfiere el valor o el error como ara::core::Result<T, E> mediante movimiento [SWS_CORE_00336]. El método get() ofrece conformidad con STL, lanza excepciones de C++ en caso de error y no participa en la resolución de sobrecargas si el manejo de excepciones de la cadena de herramientas está deshabilitado [SWS_CORE_00326].
  3. Encadenamiento asíncrono (Continuations): En lugar de un bloqueo síncrono, se puede registrar una retrollamada a través de then(), opcionalmente con asignación a un contexto de ejecución (Executor) [SWS_CORE_00331] [SWS_CORE_00337]. La retrollamada recibe el resultado como valor r (rvalue) de Result<T, E>. Si la propia función de continuación devuelve un Future o Result, then() realiza un desempaquetado automático y devuelve directamente el correspondiente Future<T2, E2> [SWS_CORE_00331] [SWS_CORE_00337].
Flujo asíncrono con GetResult()InvocadorFuturePromiseErzeugt Shared State & FutureUebergabe an KonsumentUse Case: Sincronización y recuperaciónis_ready()falseSetResult(...) / SetError(...)GetResult()Shared State geleertvalid() == falseResult<T, E>

Diagrama de secuencia: Flujo típico de la sincronización asíncrona y recogida del resultado a través de GetResult(). Fuentes: [SWS_CORE_00327], [SWS_CORE_00332], [SWS_CORE_00336]

Escenarios de error

Al trabajar con ara::core::Future, se especifican las siguientes situaciones de error:

  • Llamada sobre una instancia no válida: La invocación de is_ready(), wait(), wait_for(), wait_until(), GetResult() o then() sobre una instancia no válida (valid() == false) constituye una FutureInvalidViolation [SWS_CORE_00328] [SWS_CORE_00329] [SWS_CORE_00330] [SWS_CORE_00331] [SWS_CORE_00332] [SWS_CORE_00336] [SWS_CORE_00337]. Al invocar get(), en este caso se lanza una FutureException con el código de error kNoState [SWS_CORE_00326].
  • Shared State abandonado (Broken Promise): Si la promesa asociada abandona prematuramente el Shared State, GetResult() devuelve un Result con el código de error estandarizado FutureErrc::kBrokenPromise [SWS_CORE_00336]. Al invocar get() se activa la excepción correspondiente [SWS_CORE_00326].
  • Excepciones en funciones de continuación: Una continuación registrada no debe lanzar excepciones, excepto para implementar una Violation. Si a pesar de ello lanza una excepción, esto da lugar a una FutureContinuationHasThrownViolation [SWS_CORE_00331] [SWS_CORE_00337]. Las excepciones en clausuras deben capturarse y devolverse como un estado de error en forma de Result o Future [SWS_CORE_00331] [SWS_CORE_00337].

Esta guía se basa exclusivamente en los requisitos de especificación de AUTOSAR Adaptive Core (R25-11).

Mapa de miembros

Diagrama de clases

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

G nara__core__Future930 Future + Future() + operator=() + ~Future() + GetResult() + get() + is_ready() + then() + valid() + wait() + wait_for() + wait_until()

Vista de detalle

Selecciona una entrada en el índice.

Constructores y destructor

Future función 3

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

Sobrecargas Future 3
Future () noexcept=default; SWS_CORE_00322
Future (Future &&other) noexcept; SWS_CORE_00323
Future (const Future &)=delete; SWS_CORE_00334
~Future función

Destructor for Future objects. Abandons any shared state

~Future () noexcept;

Métodos

get función

Get the value.

T get () noexcept(false);
GetResult función

Get the result.

Result< T, E > GetResult () noexcept(std::is_nothrow_move_ constructible< T >::value &&std::is_nothrow_move_constructible< E >::value);
is_ready función

Return whether the asynchronous operation has finished.

bool is_ready () const noexcept;
then función 2

Create a new Future with the content returned by func when passed the Result of this Future. The callable func may be called in the context of this call or in the context of • Promise::set_result(const T&) • Promise::set_result(T&&) • Promise::SetError(E&&) • Promise::SetError(const E&) or somewhere else.

Sobrecargas then 2
template <typename F> auto then (F &&func) noexcept -> Future< <see below> >; SWS_CORE_00331
template <typename F, typename ExecutorT> auto then (F &&func, ExecutorT &&executor) noexcept -> Future< <see below> >; SWS_CORE_00337
valid función

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

bool valid () const noexcept;
wait función

Wait for a value or an error to be available.

void wait () const noexcept;
wait_for función

Wait for the timeoutDuration or until a value or an error is available.

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

Wait until the deadline or until a value or an error is available.

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

Operadores

operator= función 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_00325
Future & operator= (const Future &)=delete; SWS_CORE_00335

Documentación de los métodos

función Future [SWS_CORE_00322] Upstream: RS_AP_00130

Future () noexcept=default;

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
Exception-Sicherheitexception safe

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

Record
AUTOSAR/AP/record/SWS_CORE_00322
Status
valid/unmigrated
Version
AUTOSAR/AP/record/SWS_CORE_00322@rel:R25-11#62c17039
Content hash
62c17039
Source
https://www.autosar.org/fileadmin/standards/R25-11/AP/AUTOSAR_AP_SWS_Core.pdf#nameddest=SWS_CORE_00322
Status: valid/unmigrated Version: rel:R25-11#869eb074 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_00322@rel:R25-11#869eb074
Point-in-Time History:
Recorded Revisions (8):
  • R25-11rel:R25-11#f20c46ff2026-09-30
  • R19-11rel:R19-11#dea6599e2026-10-14
  • R20-11rel:R20-11#40f0427d2026-10-14
  • R21-11rel:R21-11#40f0427d2026-10-14
  • R22-11rel:R22-11#3116da522026-10-14
  • R23-11rel:R23-11#42749bfd2026-10-14
  • R24-11rel:R24-11#27bc40832026-10-14
  • R25-11rel:R25-11#869eb0742026-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

función Future [SWS_CORE_00323] 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
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_00323
Status
valid/unmigrated
Version
AUTOSAR/AP/record/SWS_CORE_00323@rel:R25-11#7e2891f8
Content hash
7e2891f8
Source
https://www.autosar.org/fileadmin/standards/R25-11/AP/AUTOSAR_AP_SWS_Core.pdf#nameddest=SWS_CORE_00323
Status: valid/unmigrated Version: rel:R25-11#67bc21d5 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_00323@rel:R25-11#67bc21d5
Point-in-Time History:
Recorded Revisions (8):
  • R25-11rel:R25-11#16df79b52026-09-30
  • R19-11rel:R19-11#8b1810862026-10-14
  • R20-11rel:R20-11#d2675b492026-10-14
  • R21-11rel:R21-11#9ce1ca602026-10-14
  • R22-11rel:R22-11#62a98b892026-10-14
  • R23-11rel:R23-11#d38da6892026-10-14
  • R24-11rel:R24-11#7f1618232026-10-14
  • R25-11rel:R25-11#67bc21d52026-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

función Future [SWS_CORE_00334] Upstream: RS_AP_00130

Future (const Future &)=delete;

Copy constructor shall be disabled

Header-Datei#include "ara/core/future.h"
Scopeclass ara::core::Future

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

Record
AUTOSAR/AP/record/SWS_CORE_00334
Status
valid/unmigrated
Version
AUTOSAR/AP/record/SWS_CORE_00334@rel:R25-11#319838d8
Content hash
319838d8
Source
https://www.autosar.org/fileadmin/standards/R25-11/AP/AUTOSAR_AP_SWS_Core.pdf#nameddest=SWS_CORE_00334
Status: valid/unmigrated Version: rel:R25-11#1f07079c 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_00334@rel:R25-11#1f07079c
Point-in-Time History:
Recorded Revisions (8):
  • R25-11rel:R25-11#108bb8a72026-09-30
  • R19-11rel:R19-11#4a6d37412026-10-14
  • R20-11rel:R20-11#a10780802026-10-14
  • R21-11rel:R21-11#2f2e218f2026-10-14
  • R22-11rel:R22-11#2129f6a42026-10-14
  • R23-11rel:R23-11#ce09ab2b2026-10-14
  • R24-11rel:R24-11#7862d2022026-10-14
  • R25-11rel:R25-11#1f07079c2026-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

función GetResult [SWS_CORE_00336] Upstream: RS_AP_00130

Result< T, E > GetResult () noexcept(std::is_nothrow_move_ constructible< T >::value &&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.

As per std::future, after this function is called the Future is no longer valid ( valid() ==FALSE ).

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

Rückgabewert

TypBeschreibung
Result< T, E >a ara::core::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: • – 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].

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_00336
Status
valid/unmigrated
Version
AUTOSAR/AP/record/SWS_CORE_00336@rel:R25-11#f968b633
Content hash
f968b633
Source
https://www.autosar.org/fileadmin/standards/R25-11/AP/AUTOSAR_AP_SWS_Core.pdf#nameddest=SWS_CORE_00336
Status: valid/unmigrated Version: rel:R25-11#0af67485 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_00336@rel:R25-11#0af67485
Point-in-Time History:
Recorded Revisions (8):
  • R25-11rel:R25-11#7983aa762026-09-30
  • R19-11rel:R19-11#1ac6dc312026-10-14
  • R20-11rel:R20-11#652256322026-10-14
  • R21-11rel:R21-11#652256322026-10-14
  • R22-11rel:R22-11#8964f0202026-10-14
  • R23-11rel:R23-11#2380a90e2026-10-14
  • R24-11rel:R24-11#09c337922026-10-14
  • R25-11rel:R25-11#0af674852026-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

función get [SWS_CORE_00326] Upstream: RS_AP_00130

T get () noexcept(false);

Get the value.

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

As per std::future, after this function is called the Future is no longer valid ( valid() ==FALSE ).

GENERADO POR IA no revisado Modelo: gemini-3.8-flash-medium · Esfuerzo: medium · Temperatura: no controlable · Prompt: bdf8e21a85ce Procedencia
traducido de la guía alemanagemini-3.8-flash-low · 2026-10-13 · Original en alemán

usar

El método get() recupera sincrónicamente el resultado de tipo T de un ara::core::Future [SWS_CORE_00326]. La función se comporta de forma idéntica a su homóloga en std::future; si el cómputo asincrónico aún continúa, la llamada se bloquea hasta su finalización o hasta que ocurra un error [SWS_CORE_00336]. Debido a la llamada, el objeto pierde su estado, de modo que el Future queda invalidado de inmediato (valid() == false) [SWS_CORE_00326]. Una llamada sin bloqueo puede asegurarse previamente mediante is_ready() [SWS_CORE_00332].

Manejo de errores

Los fallos se señalan a través de excepciones de C++ [SWS_CORE_00326]:

  • Si en el Promise asignado se registró un error mediante SetError() o SetResult(), se lanza una excepción del tipo de error correspondiente [SWS_CORE_00326].
  • Si la operación asincrónica abandona prematuramente el Shared State, esto da lugar al error kBrokenPromise conforme a FutureErrc [SWS_CORE_00326], [SWS_CORE_00400].
  • Si la llamada se realiza en una instancia no válida, se lanza una FutureException con el código de error kNoState [SWS_CORE_00326].

Concurrencia y restricciones

La operación no es ni segura para subprocesos ni segura frente a excepciones (not exception safe) [SWS_CORE_00326]. Los accesos simultáneos al mismo Future desde varios subprocesos requieren sincronización externa. Si las excepciones están desactivadas en la cadena de herramientas del compilador, get() no participa en la resolución de sobrecargas [SWS_CORE_00326]; para este caso existe la alternativa sin excepciones GetResult() [SWS_CORE_00336]. Para instancias sin valor de retorno está disponible la especialización Future<void, E>::get() [SWS_CORE_06226].

Esta nota de uso se creó automáticamente a partir de la especificación AUTOSAR Adaptive R25-11.

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

Rückgabewert

TypBeschreibung
Tvalue of type T

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 if 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_00326
Status
valid/unmigrated
Version
AUTOSAR/AP/record/SWS_CORE_00326@rel:R25-11#9cb60f9b
Content hash
9cb60f9b
Source
https://www.autosar.org/fileadmin/standards/R25-11/AP/AUTOSAR_AP_SWS_Core.pdf#nameddest=SWS_CORE_00326
Status: valid/unmigrated Version: rel:R25-11#86352c5a 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_00326@rel:R25-11#86352c5a
Point-in-Time History:
Recorded Revisions (8):
  • R25-11rel:R25-11#772635442026-09-30
  • R19-11rel:R19-11#bf2bb1bc2026-10-14
  • R20-11rel:R20-11#1b0259a32026-10-14
  • R21-11rel:R21-11#e72dc9d62026-10-14
  • R22-11rel:R22-11#5fce45d52026-10-14
  • R23-11rel:R23-11#2294bfde2026-10-14
  • R24-11rel:R24-11#83b80b3f2026-10-14
  • R25-11rel:R25-11#86352c5a2026-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

función is_ready [SWS_CORE_00332] Upstream: RS_AP_00130

bool is_ready () const noexcept;

Return whether the asynchronous operation has finished.

If this function returns TRUE, get(), GetResult() and the wait() calls are guaranteed not to block.

Header-Datei#include "ara/core/future.h"
Scopeclass ara::core::Future
Exception-Sicherheitexception safe
Thread-Sicherheitthread-safe
Verletzungen (Violations)FutureInvalidVio- If the Future is invalid ( valid() ==FALSE ). lation

Rückgabewert

TypBeschreibung
bool• TRUE: the Future contains a value or an error • FALSE: the Future does NOT contain a value or an error

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

Record
AUTOSAR/AP/record/SWS_CORE_00332
Status
valid/unmigrated
Version
AUTOSAR/AP/record/SWS_CORE_00332@rel:R25-11#38578045
Content hash
38578045
Source
https://www.autosar.org/fileadmin/standards/R25-11/AP/AUTOSAR_AP_SWS_Core.pdf#nameddest=SWS_CORE_00332
Status: valid/unmigrated Version: rel:R25-11#3a721122 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_00332@rel:R25-11#3a721122
Point-in-Time History:
Recorded Revisions (8):
  • R25-11rel:R25-11#7b5a5cd82026-09-30
  • R19-11rel:R19-11#1351fbd62026-10-14
  • R20-11rel:R20-11#29432cbf2026-10-14
  • R21-11rel:R21-11#5f5d2ce12026-10-14
  • R22-11rel:R22-11#5dc081682026-10-14
  • R23-11rel:R23-11#377e18d72026-10-14
  • R24-11rel:R24-11#3361542e2026-10-14
  • R25-11rel:R25-11#3a7211222026-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

función operator= [SWS_CORE_00325] 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
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_00325
Status
valid/unmigrated
Version
AUTOSAR/AP/record/SWS_CORE_00325@rel:R25-11#a04554c2
Content hash
a04554c2
Source
https://www.autosar.org/fileadmin/standards/R25-11/AP/AUTOSAR_AP_SWS_Core.pdf#nameddest=SWS_CORE_00325
Status: valid/unmigrated Version: rel:R25-11#aaf376df 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_00325@rel:R25-11#aaf376df
Point-in-Time History:
Recorded Revisions (8):
  • R25-11rel:R25-11#13e5b1852026-09-30
  • R19-11rel:R19-11#93353d342026-10-14
  • R20-11rel:R20-11#3bdb585e2026-10-14
  • R21-11rel:R21-11#a4d956ef2026-10-14
  • R22-11rel:R22-11#9c832db92026-10-14
  • R23-11rel:R23-11#c2dbc2b52026-10-14
  • R24-11rel:R24-11#5c0627a82026-10-14
  • R25-11rel:R25-11#aaf376df2026-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

función operator= [SWS_CORE_00335] Upstream: RS_AP_00130

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

Copy assignment operator shall be disabled

Header-Datei#include "ara/core/future.h"
Scopeclass ara::core::Future

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

Record
AUTOSAR/AP/record/SWS_CORE_00335
Status
valid/unmigrated
Version
AUTOSAR/AP/record/SWS_CORE_00335@rel:R25-11#ba309e1c
Content hash
ba309e1c
Source
https://www.autosar.org/fileadmin/standards/R25-11/AP/AUTOSAR_AP_SWS_Core.pdf#nameddest=SWS_CORE_00335
Status: valid/unmigrated Version: rel:R25-11#9bdef4fb 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_00335@rel:R25-11#9bdef4fb
Point-in-Time History:
Recorded Revisions (8):
  • R25-11rel:R25-11#b9b4dead2026-09-30
  • R19-11rel:R19-11#3780a25f2026-10-14
  • R20-11rel:R20-11#7f6cf9742026-10-14
  • R21-11rel:R21-11#7f6cf9742026-10-14
  • R22-11rel:R22-11#b8baf3702026-10-14
  • R23-11rel:R23-11#e09e21542026-10-14
  • R24-11rel:R24-11#bb38b8c92026-10-14
  • R25-11rel:R25-11#9bdef4fb2026-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

función then [SWS_CORE_00331] 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. The callable func may be called in the context of this call or in the context of • Promise::set_result(const T&) • Promise::set_result(T&&) • Promise::SetError(E&&) • Promise::SetError(const E&) or somewhere else.

valid() ==FALSE on the original Future object immediately after it returns.

The Callable input argument func takes a Result<T,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<T,E>>). Return type deduction: • 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 then(...) are registered in the Future F that 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.

GENERADO POR IA no revisado Modelo: gemini-3.8-flash-medium · Esfuerzo: medium · Temperatura: no controlable · Prompt: 771d2952e4cb Procedencia
traducido de la guía alemanagemini-3.8-flash-low · 2026-10-13 · Original en alemán

La función miembro then sirve para encadenar cálculos asincrónicos y registra un objeto invocable func como continuación en una instancia de ara::core::Future [SWS_CORE_00331]. Al retornar la llamada, el Future original queda invalidado (valid() == false). El destino de invocación recibe el resultado de la instancia obtenido mediante GetResult() como un Rvalue de tipo Result<T, E> [SWS_CORE_00331].

El tipo de retorno de then se rige por el tipo de retorno U de la continuación [SWS_CORE_00331]:

  • Si func devuelve un Future<T2, E2>, se produce un desempaquetado implícito de Future (Future-Unwrapping) a Future<T2, E2> [SWS_CORE_00331].
  • Si func devuelve un Result<T2, E2>, se produce un desempaquetado implícito de Result (Result-Unwrapping) a Future<T2, E2> [SWS_CORE_00331].
  • En todos los demás casos, el tipo de retorno es Future<U, E> [SWS_CORE_00331].

La ejecución de func puede tener lugar sincrónicamente en el contexto de la llamada de then, en el contexto de Promise::set_result o Promise::SetError, o en otro contexto [SWS_CORE_00331]. La llamada está especificada como no segura para subprocesos. La continuación se registra en el Future devuelto; tras el retorno de su destructor no se podrá ejecutar ninguna continuación más, mientras que una ejecución que ya esté en curso se ejecutará hasta el final [SWS_CORE_00331].

No existen códigos de error estandarizados [SWS_CORE_00331]. Los errores deben ser capturados por los usuarios y transmitidos como código de error en un Result o un Future devuelto, ya que las excepciones no deben salir de la continuación. Una llamada en un Future no válido desencadena FutureInvalidViolation; si la continuación lanza una excepción, esto resulta en FutureContinuationHasThrownViolation [SWS_CORE_00331].

Para ejecuciones en un contexto de ejecución explícito se encuentra disponible la sobrecarga con ejecutor [SWS_CORE_00337], mientras que para operaciones sin valor de retorno se aplica la especialización void [SWS_CORE_06231].

Esta nota de uso fue generada por una IA sobre la base de la especificación AUTOSAR Adaptive R25-11.

Header-Datei#include "ara/core/future.h"
Scopeclass ara::core::Future
Exception-Sicherheitexception safe
Thread-Sicherheitnot thread-safe
Verletzungen (Violations)FutureInvalidVio- If the Future is invalid ( valid ==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.
Hinweise: 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. Exceptions can be used within the continuation, however if they do not realize a Violation, they must not escape the continuation.

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

Record
AUTOSAR/AP/record/SWS_CORE_00331
Status
valid/unmigrated
Version
AUTOSAR/AP/record/SWS_CORE_00331@rel:R25-11#be78df77
Content hash
be78df77
Source
https://www.autosar.org/fileadmin/standards/R25-11/AP/AUTOSAR_AP_SWS_Core.pdf#nameddest=SWS_CORE_00331
Status: valid/unmigrated Version: rel:R25-11#7ccfcd36 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_00331@rel:R25-11#7ccfcd36
Point-in-Time History:
Recorded Revisions (8):
  • R25-11rel:R25-11#07a6189e2026-09-30
  • R19-11rel:R19-11#ab04e9222026-10-14
  • R20-11rel:R20-11#99557d6e2026-10-14
  • R21-11rel:R21-11#3a933d6a2026-10-14
  • R22-11rel:R22-11#008dba362026-10-14
  • R23-11rel:R23-11#4907cfa12026-10-14
  • R24-11rel:R24-11#2eae23502026-10-14
  • R25-11rel:R25-11#7ccfcd362026-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

función then [SWS_CORE_00337] 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<T,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<T,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.

GENERADO POR IA no revisado Modelo: gemini-3.8-flash-medium · Esfuerzo: medium · Temperatura: no controlable · Prompt: b5ca6c97ece5 Procedencia
traducido de la guía alemanagemini-3.8-flash-low · 2026-10-13 · Original en alemán

Uso y semántica

El método then registra una continuación (func) que se ejecuta de forma asíncrona en el contexto del executor pasado en cuanto se dispone del resultado de la instancia de Future actual [SWS_CORE_00337]. La unidad invocable toma el resultado de la instancia como una expresión rvalue del tipo Result<T,E> [SWS_CORE_00337]. El tipo de retorno depende del tipo de retorno U de la continuación:

  • Si la continuación devuelve un Future<T2,E2>, se produce un desempaquetado implícito a Future<T2,E2> [SWS_CORE_00337].
  • Si la continuación devuelve un Result<T2,E2>, este también se resuelve implícitamente a Future<T2,E2> [SWS_CORE_00337].
  • En todos los demás casos, la llamada devuelve Future<U,E> [SWS_CORE_00337].

Concurrencia y ciclo de vida

Inmediatamente después del retorno de la llamada al método, la instancia original de Future pasa a ser no válida (valid() == false) [SWS_CORE_00337]. La función está declarada como no segura para subprocesos [SWS_CORE_00337]. Las continuaciones registradas se gestionan en el Future devuelto de nuevo. Tras la finalización de su destructor, no se debe iniciar ninguna continuación más; una ejecución que ya esté en curso se completará, por lo que el destructor puede bloquearse [SWS_CORE_00337].

Tratamiento de errores e interacción

No hay definidos códigos de error estandarizados [SWS_CORE_00337]. Una llamada en una instancia no válida desencadena la infracción FutureInvalidViolation [SWS_CORE_00337]. Si la continuación lanza una excepción, esto resulta en una FutureContinuationHasThrownViolation; por lo tanto, las excepciones deben capturarse y transmitirse como errores mediante ara::core::Result o ara::core::Future [SWS_CORE_00337]. En comparación con la sobrecarga sin contexto de ejecución [SWS_CORE_00331], esta variante impone la ejecución en el ejecutor pasado; para tipos de resultado void existe la especialización análoga [SWS_CORE_06237].

Esta nota de uso se basa en la especificación AUTOSAR Adaptive R25-11.

Header-Datei#include "ara/core/future.h"
Scopeclass ara::core::Future
Exception-Sicherheitexception safe
Thread-Sicherheitnot thread-safe
Verletzungen (Violations)FutureInvalidVio- If the Future is invalid ( valid ==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 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_00337
Status
valid/unmigrated
Version
AUTOSAR/AP/record/SWS_CORE_00337@rel:R25-11#593a88e1
Content hash
593a88e1
Source
https://www.autosar.org/fileadmin/standards/R25-11/AP/AUTOSAR_AP_SWS_Core.pdf#nameddest=SWS_CORE_00337
Status: valid/unmigrated Version: rel:R25-11#749fe9dc 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_00337@rel:R25-11#749fe9dc
Point-in-Time History:
Recorded Revisions (7):
  • R25-11rel:R25-11#1e610dd32026-09-30
  • R20-11rel:R20-11#12659cf92026-10-14
  • R21-11rel:R21-11#ecfba0d52026-10-14
  • R22-11rel:R22-11#d94fa7762026-10-14
  • R23-11rel:R23-11#8b664ec92026-10-14
  • R24-11rel:R24-11#853472252026-10-14
  • R25-11rel:R25-11#749fe9dc2026-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

función valid [SWS_CORE_00327] 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.

GENERADO POR IA no revisado Modelo: gemini-3.8-flash-medium · Esfuerzo: medium · Temperatura: no controlable · Prompt: 0fe78ab97a32 Procedencia
traducido de la guía alemanagemini-3.8-flash-low · 2026-10-13 · Original en alemán

La función de consulta síncrona valid() comprueba sin parámetros si una instancia de ara::core::Future posee un estado compartido (Shared State) y, con ello, si es utilizable [SWS_CORE_00327]. Devuelve true si el objeto está listo para su uso, y false si no existe ningún estado compartido [SWS_CORE_00327]. El comportamiento corresponde a la función estándar std::future::valid y es aplicable del mismo modo para la especialización de plantilla ara::core::Future<void, E> [SWS_CORE_06227].

La función está declarada como noexcept, se considera segura frente a excepciones (exception safe) y está especificada expresamente como segura para subprocesos (thread-safe) [SWS_CORE_00327]. Ella misma no desencadena códigos de error ni excepciones y, por lo tanto, puede utilizarse sin peligro para la comprobación del estado [SWS_CORE_00327].

En la interacción con otros métodos de Future, la comprobación de validez es crucial, ya que las operaciones invocadoras como wait() [SWS_CORE_00328] o is_ready() [SWS_CORE_00332] lanzan una FutureInvalidViolation en caso de estado no válido (valid() == false). Un Future previamente válido pasa a ser automáticamente no válido tan pronto como se consume su resultado mediante get() [SWS_CORE_00326] o GetResult() [SWS_CORE_00336] o se registra un procesamiento posterior a través de then() [SWS_CORE_00331], [SWS_CORE_00337].

Este texto fue creado por una IA y sirve como guía orientativa. Solo son vinculantes las especificaciones de AUTOSAR enlazadas.

Guía del implementador pendiente (complejidad I1)

Header-Datei#include "ara/core/future.h"
Scopeclass ara::core::Future
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_00327
Status
valid/unmigrated
Version
AUTOSAR/AP/record/SWS_CORE_00327@rel:R25-11#89069367
Content hash
89069367
Source
https://www.autosar.org/fileadmin/standards/R25-11/AP/AUTOSAR_AP_SWS_Core.pdf#nameddest=SWS_CORE_00327
Status: valid/unmigrated Version: rel:R25-11#67ea8cce 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_00327@rel:R25-11#67ea8cce
Point-in-Time History:
Recorded Revisions (8):
  • R25-11rel:R25-11#d314fbc32026-09-30
  • R19-11rel:R19-11#80d78b532026-10-14
  • R20-11rel:R20-11#b7f4e1552026-10-14
  • R21-11rel:R21-11#688e791c2026-10-14
  • R22-11rel:R22-11#4e92dc072026-10-14
  • R23-11rel:R23-11#91718d0e2026-10-14
  • R24-11rel:R24-11#1c24bacf2026-10-14
  • R25-11rel:R25-11#67ea8cce2026-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

función wait [SWS_CORE_00328] 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

GENERADO POR IA no revisado Modelo: gemini-3.8-flash-medium · Esfuerzo: medium · Temperatura: no controlable · Prompt: 9635b0074677 Procedencia
traducido de la guía alemanagemini-3.8-flash-low · 2026-10-13 · Original en alemán

La función miembro wait de la clase ara::core::Future bloquea el hilo llamador de forma síncrona hasta que esté disponible un valor resultante o un error de la operación asíncrona [SWS_CORE_00328]. La función no acepta parámetros, no devuelve ningún valor y, conforme a la especificación, se comporta de forma análoga a la función correspondiente de std::future [SWS_CORE_00328]. El mismo comportamiento es aplicable a la especialización de plantilla ara::core::Future<void, E> [SWS_CORE_06228].

En cuanto al tratamiento de errores y la concurrencia, se definen las siguientes prescripciones:

  • Condición de error: Si el objeto Future no es válido (valid == FALSE), se produce un FutureInvalidViolation [SWS_CORE_00328], [SWS_CORE_06228]. No obstante, la función está declarada como noexcept y clasificada como segura frente a excepciones (exception safe) [SWS_CORE_00328].
  • Seguridad frente a hilos: La invocación está clasificada explícitamente como not thread-safe [SWS_CORE_00328]. Un acceso concurrente al mismo objeto Future sin sincronización externa no está permitido.

En interacción con interfaces afines, se recomienda realizar la comprobación mediante is_ready [SWS_CORE_00332], [SWS_CORE_06232] antes de la llamada: si esta devuelve true, se garantiza que la invocación de wait ya no se bloqueará. Si en lugar de una espera indefinida se requiere un proceso de bloqueo limitado en el tiempo, están disponibles alternativamente wait_for con una duración temporal relativa [SWS_CORE_00329], [SWS_CORE_06229], así como wait_until con un punto temporal absoluto [SWS_CORE_00330], [SWS_CORE_06230].

Esta indicación de uso se generó automáticamente a partir de la especificación AUTOSAR Adaptive R25-11.

Header-Datei#include "ara/core/future.h"
Scopeclass ara::core::Future
Exception-Sicherheitexception safe
Thread-Sicherheitnot thread-safe
Verletzungen (Violations)FutureInvalidVio- If the Future is invalid ( valid ==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_00328
Status
valid/unmigrated
Version
AUTOSAR/AP/record/SWS_CORE_00328@rel:R25-11#250075bf
Content hash
250075bf
Source
https://www.autosar.org/fileadmin/standards/R25-11/AP/AUTOSAR_AP_SWS_Core.pdf#nameddest=SWS_CORE_00328
Status: valid/unmigrated Version: rel:R25-11#7d1caea0 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_00328@rel:R25-11#7d1caea0
Point-in-Time History:
Recorded Revisions (8):
  • R25-11rel:R25-11#71020ccc2026-09-30
  • R19-11rel:R19-11#1457e28d2026-10-14
  • R20-11rel:R20-11#7259d3062026-10-14
  • R21-11rel:R21-11#82e85c2e2026-10-14
  • R22-11rel:R22-11#63ca481a2026-10-14
  • R23-11rel:R23-11#7b23f9cb2026-10-14
  • R24-11rel:R24-11#4301d6592026-10-14
  • R25-11rel:R25-11#7d1caea02026-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

función wait_for [SWS_CORE_00329] Upstream: RS_AP_00130

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

Wait for the timeoutDuration or until a value or an error is available.

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

GENERADO POR IA no revisado Modelo: gemini-3.8-flash-medium · Esfuerzo: medium · Temperatura: no controlable · Prompt: 360b2640b7ed Procedencia Preguntas abiertas (1)
traducido de la guía alemanagemini-3.8-flash-low · 2026-10-13 · Original en alemán

usar

La función miembro wait_for de la clase ara::core::Future bloquea el hilo que realiza la llamada durante un tiempo máximo igual al intervalo de tiempo pasado timeoutDuration o hasta que un valor de resultado o un error esté disponible en el estado compartido [SWS_CORE_00329]. Su comportamiento corresponde a la función equivalente de std::future [SWS_CORE_00329]. Como valor de retorno proporciona un FutureStatus [SWS_CORE_00329], que indica si el estado compartido está disponible (kReady) o si el tiempo de espera predeterminado ha expirado (kTimeout) [SWS_CORE_00361].

Tratamiento de errores y condiciones límite

La función está declarada como noexcept y especificada como segura ante excepciones (exception safe) [SWS_CORE_00329]. Si el objeto Future no es válido (valid == FALSE), se produce una infracción en forma de FutureInvalidViolation [SWS_CORE_00329]. Interpretación: dado que no se deben lanzar excepciones de C++, es de suponer que dicha infracción sea tratada por la plataforma como un error fatal en tiempo de ejecución. Pregunta Q-2f22a07f6e143856 (abierta)

Concurrencia e interacción

La operación está clasificada como not thread-safe [SWS_CORE_00329]; por lo tanto, los accesos simultáneos a la misma instancia requieren sincronización externa. La semántica y la firma aplican de forma idéntica a la especialización de plantilla ara::core::Future<void, E> [SWS_CORE_06229]. A diferencia de std::future_status, en el tipo de enumeración FutureStatus no existe ninguna entrada para deferred [SWS_CORE_00361].

Este texto ha sido generado por una IA sobre la base de la especificación R25-11 de AUTOSAR.

Guía del implementador pendiente (complejidad I1)

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

Parameter (in)

ParameterBeschreibung
timeoutDurationmaximal duration to wait for

Rückgabewert

TypBeschreibung
FutureStatusStatus that indicates whether the timeoutDuration expired 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_00329
Status
valid/unmigrated
Version
AUTOSAR/AP/record/SWS_CORE_00329@rel:R25-11#edce964c
Content hash
edce964c
Source
https://www.autosar.org/fileadmin/standards/R25-11/AP/AUTOSAR_AP_SWS_Core.pdf#nameddest=SWS_CORE_00329
Status: valid/unmigrated Version: rel:R25-11#bb164066 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_00329@rel:R25-11#bb164066
Point-in-Time History:
Recorded Revisions (8):
  • R25-11rel:R25-11#669e52732026-09-30
  • R19-11rel:R19-11#34429cdd2026-10-14
  • R20-11rel:R20-11#6e3fcfd92026-10-14
  • R21-11rel:R21-11#6e3fcfd92026-10-14
  • R22-11rel:R22-11#4c259d672026-10-14
  • R23-11rel:R23-11#ec6d12432026-10-14
  • R24-11rel:R24-11#adb812622026-10-14
  • R25-11rel:R25-11#bb1640662026-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

función wait_until [SWS_CORE_00330] 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 deadline or until a value or an error is available.

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

GENERADO POR IA no revisado Modelo: gemini-3.8-flash-medium · Esfuerzo: medium · Temperatura: no controlable · Prompt: b4703e774b3e Procedencia
traducido de la guía alemanagemini-3.8-flash-low · 2026-10-13 · Original en alemán

La función miembro wait_until bloquea el hilo llamante hasta que se alcanza el instante temporal absoluto especificado deadline o bien el ara::core::Future proporciona un resultado o un error [SWS_CORE_00330]. El comportamiento se basa en la función correspondiente de std::future [SWS_CORE_00330].

Como valor de retorno, la función proporciona un FutureStatus [SWS_CORE_00330]. Este tipo enum señala a través del estado kReady que el estado compartido está listo (valor o error disponible), o a través de kTimeout que el plazo ha expirado sin resultado [SWS_CORE_00361]. En FutureStatus no existe un estado análogo a std::future_status::deferred [SWS_CORE_00361].

En cuanto al tratamiento de errores y la seguridad frente a excepciones, la función está especificada como segura ante excepciones (exception safe) y noexcept [SWS_CORE_00330]. Sin embargo, si la función se llama sobre una instancia no válida (valid == FALSE), se produce una infracción en forma de FutureInvalidViolation [SWS_CORE_00330].

Respecto a la concurrencia, wait_until está clasificado como no seguro frente a hilos (not thread-safe) [SWS_CORE_00330]. Por tanto, los accesos paralelos al mismo objeto ara::core::Future deben sincronizarse externamente. La misma semántica y firma se aplican a la especialización ara::core::Future<void, E> [SWS_CORE_06230].

Este texto fue creado por una IA y sirve como guía orientativa. El documento determinante es la especificación.

Guía del implementador pendiente (complejidad I1)

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

Parameter (in)

ParameterBeschreibung
deadlinelatest point in time to wait

Rückgabewert

TypBeschreibung
FutureStatusstatus that indicates whether the deadline 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_00330
Status
valid/unmigrated
Version
AUTOSAR/AP/record/SWS_CORE_00330@rel:R25-11#7e7dba97
Content hash
7e7dba97
Source
https://www.autosar.org/fileadmin/standards/R25-11/AP/AUTOSAR_AP_SWS_Core.pdf#nameddest=SWS_CORE_00330
Status: valid/unmigrated Version: rel:R25-11#00db6175 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_00330@rel:R25-11#00db6175
Point-in-Time History:
Recorded Revisions (8):
  • R25-11rel:R25-11#f662b2c42026-09-30
  • R19-11rel:R19-11#a84101962026-10-14
  • R20-11rel:R20-11#4f8fd4042026-10-14
  • R21-11rel:R21-11#0fe1ad9c2026-10-14
  • R22-11rel:R22-11#6ef3c1042026-10-14
  • R23-11rel:R23-11#872aa1602026-10-14
  • R24-11rel:R24-11#412256922026-10-14
  • R25-11rel:R25-11#00db61752026-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

función ~Future [SWS_CORE_00333] 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
Exception-Sicherheitexception safe
Thread-Sicherheitnot thread-safe

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

Record
AUTOSAR/AP/record/SWS_CORE_00333
Status
valid/unmigrated
Version
AUTOSAR/AP/record/SWS_CORE_00333@rel:R25-11#c6474c28
Content hash
c6474c28
Source
https://www.autosar.org/fileadmin/standards/R25-11/AP/AUTOSAR_AP_SWS_Core.pdf#nameddest=SWS_CORE_00333
Status: valid/unmigrated Version: rel:R25-11#2689e3e8 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_00333@rel:R25-11#2689e3e8
Point-in-Time History:
Recorded Revisions (8):
  • R25-11rel:R25-11#16f70bc12026-09-30
  • R19-11rel:R19-11#42ac89202026-10-14
  • R20-11rel:R20-11#8f4a235f2026-10-14
  • R21-11rel:R21-11#eccb21be2026-10-14
  • R22-11rel:R22-11#58e9180f2026-10-14
  • R23-11rel:R23-11#b308517b2026-10-14
  • R24-11rel:R24-11#02a09fc62026-10-14
  • R25-11rel:R25-11#2689e3e82026-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