DEENESPTFRRUARHIKOZHNL

class 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

User GuideKI-GENERIERT

Ermöglicht den synchronen oder asynchronen Empfang von Werten und Fehlern aus einer nebenläufigen Operation.
KI-GENERIERT ungeprüft Modell: gemini-3.8-flash-medium · Aufwand: medium · Temperatur: nicht steuerbar · Prompt: fbd974cb6be2 Herkunft Offene Fragen (1)
KI-generiertgemini-3.8-flash-medium · 2026-10-13

Ermöglicht den synchronen oder asynchronen Empfang von Werten und Fehlern aus einer nebenläufigen Operation.

Die Klasse ara::core::Future dient als Empfänger-Handle für das Ergebnis einer asynchronen Operation und verwaltet den Zugriff auf einen gemeinsamen Zustand [SWS_CORE_00327]. Konsumenten können den Zustand nicht-blockierend prüfen, synchron auf die Fertigstellung warten oder das Ergebnis über GetResult() ausnahmefrei als ara::core::Result entgegennehmen [SWS_CORE_00336]. Da Kopieroperationen gelöscht sind, wird der Besitz exklusiv verwaltet, und nach der Ergebnisabholung oder Weiterleitung mittels Continuation wird das Objekt unmittelbar ungültig.

Kontext

Die Template-Klasse ara::core::Future stellt das Empfänger-Endelement für Ergebnisse asynchroner Operationen innerhalb der AUTOSAR Adaptive Platform dar. Sie ermöglicht den kontrollierten Zugriff auf einen gemeinsamen Zustand (Shared State), der von einer erzeugenden Instanz asynchron befüllt wird [SWS_CORE_00327]. Konzeptionell implementiert die Klasse std::future aus dem C++17-Standard ISO/IEC 14882:2017 [11], integriert sich jedoch nahtlos in das fehlerausnahmebasierte Konzept der Plattform: Für den Template-Parameter E ist zwingend der Fehlertyp ara::core::ErrorCode vorgegeben; jede abweichende Spezifikation führt zu einem Übersetzungsfehler. Zu den primären Interaktionspartnern zählen der asynchrone Erzeuger (wie ein assoziiertes Promise), welcher den Wert oder Fehler bereitstellt, die Future-Instanz als exklusiver Empfänger sowie ein Konsument oder Ausführungskontext (ExecutorT), an den Folgeaufgaben übergeben werden [SWS_CORE_00331] [SWS_CORE_00337].

Lebenszyklus

Die Erzeugung, Zustandsverwaltung und Vernichtung von ara::core::Future unterliegt strengen Regeln zur Gewährleistung deterministischer Besitzverhältnisse:

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 setzt Wert oder Fehler ValidReady->Invalid GetResult() / get() / then()

Zustandsdiagramm: Lebenszyklus und Zustandsübergänge einer Future-Instanz bezüglich Gültigkeit und Verfügbarkeit des Shared State. Quellen: [SWS_CORE_00322], [SWS_CORE_00326], [SWS_CORE_00327], [SWS_CORE_00331], [SWS_CORE_00332], [SWS_CORE_00333], [SWS_CORE_00336]

Nutzungspfad

Ein typischer Nutzungspfad zur Ergebnisverarbeitung gliedert sich in folgende Phasen:

  1. Statusprüfung und Synchronisation: Mit is_ready() kann vorab ermittelt werden, ob das asynchrone Ergebnis bereits vorliegt [SWS_CORE_00332]. Ist dies der Fall, blockieren nachfolgende Abrufe garantiert nicht mehr [SWS_CORE_00332]. Andernfalls kann mit wait() unbegrenzt [SWS_CORE_00328] oder zeitbeschränkt via wait_for() bzw. wait_until() synchronisiert werden [SWS_CORE_00329] [SWS_CORE_00330].
  2. Ergebnisextraktion: In AUTOSAR Adaptive Applikationen ist der Aufruf von GetResult() maßgeblich: Die Methode blockiert bei Bedarf, löst jedoch niemals Ausnahmen aus und übergibt den Wert oder Fehler als ara::core::Result<T, E> per Move [SWS_CORE_00336]. Die Methode get() bietet STL-Konformität, wirft im Fehlerfall C++-Ausnahmen und nimmt bei deaktivierter Ausnahmebehandlung der Toolchain nicht an der Überladungsauflösung teil [SWS_CORE_00326].
  3. Asynchrone Verkettung (Continuations): Anstelle synchronen Blockierens kann über then() ein Callback registriert werden, optional unter Zuweisung an einen Ausführungskontext (Executor) [SWS_CORE_00331] [SWS_CORE_00337]. Der Callback nimmt das Ergebnis als Result<T, E>-Rvalue entgegen. Liefert die Fortsetzungsfunktion selbst ein Future oder Result zurück, führt then() ein automatisches Unwrapping durch und liefert direkt ein entsprechendes Future<T2, E2> [SWS_CORE_00331] [SWS_CORE_00337].
Asynchroner Ablauf mit GetResult()AufruferFuturePromiseErzeugt Shared State & FutureUebergabe an KonsumentUse Case: Synchronisation und Abrufis_ready()falseSetResult(...) / SetError(...)GetResult()Shared State geleertvalid() == falseResult<T, E>

Sequenzdiagramm: Typischer Ablauf der asynchronen Synchronisation und Ergebnisabholung über GetResult(). Quellen: [SWS_CORE_00327], [SWS_CORE_00332], [SWS_CORE_00336]

Fehlerszenarien

Im Umgang mit ara::core::Future sind folgende Fehlersituationen spezifiziert:

  • Aufruf auf ungültiger Instanz: Der Aufruf von is_ready(), wait(), wait_for(), wait_until(), GetResult() oder then() bei einer ungültigen Instanz (valid() == false) stellt eine FutureInvalidViolation dar [SWS_CORE_00328] [SWS_CORE_00329] [SWS_CORE_00330] [SWS_CORE_00331] [SWS_CORE_00332] [SWS_CORE_00336] [SWS_CORE_00337]. Beim Aufruf von get() wird in diesem Fall eine FutureException mit dem Fehlercode kNoState geworfen [SWS_CORE_00326].
  • Verlassener Shared State (Broken Promise): Wird der Shared State vom assoziierten Promise vorzeitig aufgegeben, liefert GetResult() ein Result mit dem standardisierten Fehlercode FutureErrc::kBrokenPromise [SWS_CORE_00336]. Beim Aufruf von get() wird die entsprechende Ausnahme ausgelöst [SWS_CORE_00326].
  • Ausnahmen in Fortsetzungsfunktionen: Eine registrierte Continuation darf keine Ausnahmen werfen, außer zur Umsetzung einer Violation. Löst sie dennoch eine Ausnahme aus, führt dies zu einer FutureContinuationHasThrownViolation [SWS_CORE_00331] [SWS_CORE_00337]. Ausnahmen in Closures müssen abgefangen und als Fehlerzustand in Form eines Result oder Future zurückgegeben werden [SWS_CORE_00331] [SWS_CORE_00337].

Dieser Leitfaden basiert ausschließlich auf den Spezifikationsanforderungen von AUTOSAR Adaptive Core (R25-11).

Mitgliederkarte

Konstruktoren und Destruktor

2

Operatoren

1

Klassendiagramm

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

Detailansicht

Wähle in der Gliederung einen Eintrag aus.

Konstruktoren und Destruktor

Future function 3

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

Überladungen Future 3
Future () noexcept=default; SWS_CORE_00322
Future (Future &&other) noexcept; SWS_CORE_00323
Future (const Future &)=delete; SWS_CORE_00334
~Future function

Destructor for Future objects. Abandons any shared state

~Future () noexcept;

Methoden

get function

Get the value.

T get () noexcept(false);
GetResult function

Get the result.

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

Return whether the asynchronous operation has finished.

bool is_ready () const noexcept;
then function 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.

Überladungen 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 function

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

bool valid () const noexcept;
wait function

Wait for a value or an error to be available.

void wait () const noexcept;
wait_for function

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 function

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;

Operatoren

operator= function 2

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

Überladungen = 2
Future & operator= (Future &&other) noexcept; SWS_CORE_00325
Future & operator= (const Future &)=delete; SWS_CORE_00335

Dokumentation der Methoden

function 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#f20c46ff
Content hash
f20c46ff
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

function 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#16df79b5
Content hash
16df79b5
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

function 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#108bb8a7
Content hash
108bb8a7
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

function 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#7983aa76
Content hash
7983aa76
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

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

KI-GENERIERT ungeprüft Modell: gemini-3.8-flash-medium · Aufwand: medium · Temperatur: nicht steuerbar · Prompt: bdf8e21a85ce Herkunft
KI-generiertgemini-3.8-flash-medium · 2026-10-13

Verwendung

Die Methode get() ruft synchron das Ergebnis vom Typ T aus einem ara::core::Future ab [SWS_CORE_00326]. Die Funktion verhält sich identisch zum Pendant in std::future; falls die asynchrone Berechnung noch andauert, blockiert der Aufruf bis zur Fertigstellung oder bis zum Auftreten eines Fehlers [SWS_CORE_00336]. Durch den Aufruf verliert das Objekt seinen Zustand, sodass das Future unmittelbar ungültig wird (valid() == false) [SWS_CORE_00326]. Ein blockierungsfreier Aufruf kann vorab über is_ready() abgesichert werden [SWS_CORE_00332].

Fehlerbehandlung

Fehlschläge werden über C++-Exceptions gemeldet [SWS_CORE_00326]:

  • Wurde im zugeordneten Promise über SetError() oder SetResult() ein Fehler hinterlegt, wird eine Exception des entsprechenden Fehlertyps ausgelöst [SWS_CORE_00326].
  • Wird der Shared State von der asynchronen Operation vorzeitig aufgegeben, resultiert dies im Fehler kBrokenPromise gemäß FutureErrc [SWS_CORE_00326], [SWS_CORE_00400].
  • Erfolgt der Aufruf auf einer ungültigen Instanz, wird eine FutureException mit dem Fehlercode kNoState geworfen [SWS_CORE_00326].

Nebenläufigkeit und Einschränkungen

Die Operation ist weder threadsicher noch exceptionsicher (not exception safe) [SWS_CORE_00326]. Gleichzeitige Zugriffe auf dasselbe Future aus mehreren Threads erfordern externe Synchronisation. Sind Exceptions in der Compiler-Toolchain deaktiviert, nimmt get() nicht an der Überladungsauflösung teil [SWS_CORE_00326]; für diesen Fall existiert die exceptionsfreie Alternative GetResult() [SWS_CORE_00336]. Für Instanzen ohne Rückgabewert steht die Spezialisierung Future<void, E>::get() zur Verfügung [SWS_CORE_06226].

Dieser Nutzungshinweis wurde automatisiert auf Basis der Spezifikation AUTOSAR Adaptive R25-11 erstellt.

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#77263544
Content hash
77263544
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

function 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#7b5a5cd8
Content hash
7b5a5cd8
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

function 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#13e5b185
Content hash
13e5b185
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

function 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#b9b4dead
Content hash
b9b4dead
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

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

KI-GENERIERT ungeprüft Modell: gemini-3.8-flash-medium · Aufwand: medium · Temperatur: nicht steuerbar · Prompt: 771d2952e4cb Herkunft
KI-generiertgemini-3.8-flash-medium · 2026-10-13

Die Elementfunktion then dient der Verkettung asynchroner Berechnungen und registriert ein aufrufbares Objekt func als Continuation an einer Instanz von ara::core::Future [SWS_CORE_00331]. Nach Rückkehr des Aufrufs ist die ursprüngliche Future ungültig (valid() == false). Das Aufrufziel erhält das über GetResult() bezogene Ergebnis der Instanz als Rvalue vom Typ Result<T, E> übergeben [SWS_CORE_00331].

Der Rückgabetyp von then richtet sich nach dem Rückgabetyp U der Continuation [SWS_CORE_00331]:

  • Gibt func eine Future<T2, E2> zurück, erfolgt implizites Future-Unwrapping zu Future<T2, E2> [SWS_CORE_00331].
  • Gibt func ein Result<T2, E2> zurück, erfolgt implizites Result-Unwrapping zu Future<T2, E2> [SWS_CORE_00331].
  • In allen anderen Fällen ist der Rückgabetyp Future<U, E> [SWS_CORE_00331].

Die Ausführung von func kann synchron im Kontext des Aufrufs von then, im Kontext von Promise::set_result bzw. Promise::SetError oder in einem anderen Kontext stattfinden [SWS_CORE_00331]. Der Aufruf ist als nicht threadsicher spezifiziert. Die Continuation wird in der zurückgegebenen Future registriert; nach Rückkehr von deren Destruktor darf keine Continuation mehr ausgeführt werden, während eine bereits laufende Ausführung bis zum Ende läuft [SWS_CORE_00331].

Standardisierte Fehlercodes existieren nicht [SWS_CORE_00331]. Fehler müssen von Benutzern abgefangen und als Fehlercode in einem zurückgegebenen Result oder einer Future weitergereicht werden, da Ausnahmen die Continuation nicht verlassen dürfen. Ein Aufruf an einer ungültigen Future löst FutureInvalidViolation aus; wirft die Continuation eine Ausnahme, resultiert dies in FutureContinuationHasThrownViolation [SWS_CORE_00331].

Für Ausführungen in einem expliziten Ausführungskontext steht die Überladung mit Executor zur Verfügung [SWS_CORE_00337], während für Operationen ohne Rückgabewert die Void-Spezialisierung greift [SWS_CORE_06231].

Dieser Nutzungshinweis wurde von einer KI auf Basis der Spezifikation AUTOSAR Adaptive R25-11 generiert.

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#07a6189e
Content hash
07a6189e
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

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

KI-GENERIERT ungeprüft Modell: gemini-3.8-flash-medium · Aufwand: medium · Temperatur: nicht steuerbar · Prompt: b5ca6c97ece5 Herkunft
KI-generiertgemini-3.8-flash-medium · 2026-10-13

Verwendung und Semantik

Die Methode then registriert eine Continuation (func), die asynchron im Kontext des übergebenen executor ausgeführt wird, sobald das Ergebnis der aktuellen Future-Instanz vorliegt [SWS_CORE_00337]. Die aufrufbare Einheit nimmt das Ergebnis der Instanz als Rvalue-Ausdruck vom Typ Result<T,E> entgegen [SWS_CORE_00337]. Der Rückgabetyp richtet sich nach dem Rückgabetyp U der Continuation:

  • Gibt die Continuation ein Future<T2,E2> zurück, erfolgt ein implizites Entpacken zu Future<T2,E2> [SWS_CORE_00337].
  • Gibt die Continuation ein Result<T2,E2> zurück, wird dieses ebenfalls implizit zu Future<T2,E2> aufgelöst [SWS_CORE_00337].
  • In allen anderen Fällen liefert der Aufruf Future<U,E> [SWS_CORE_00337].

Nebenläufigkeit und Lebenszyklus

Unmittelbar nach Rückkehr des Methodenaufrufs ist die ursprüngliche Future-Instanz ungültig (valid() == false) [SWS_CORE_00337]. Die Funktion ist als nicht threadsicher deklariert [SWS_CORE_00337]. Registrierte Continuations werden im neu zurückgegebenen Future verwaltet. Nach Ablauf dessen Destruktors darf keine Continuation mehr gestartet werden; eine bereits laufende Ausführung wird zu Ende geführt, sodass der Destruktor blockieren kann [SWS_CORE_00337].

Fehlerbehandlung und Zusammenspiel

Standardisierte Fehlercodes sind nicht definiert [SWS_CORE_00337]. Ein Aufruf auf einer ungültigen Instanz löst die Violation FutureInvalidViolation aus [SWS_CORE_00337]. Wirft die Continuation eine Ausnahme, resultiert dies in einer FutureContinuationHasThrownViolation; Ausnahmen müssen daher abgefangen und als Fehler über ara::core::Result oder ara::core::Future weitergereicht werden [SWS_CORE_00337]. Gegenüber der Überladung ohne Ausführungskontext [SWS_CORE_00331] erzwingt diese Variante die Ausführung auf dem übergebenen Executor; für void-Ergebnistypen existiert die analoge Spezialisierung [SWS_CORE_06237].

Dieser Nutzungshinweis basiert auf der Spezifikation 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#1e610dd3
Content hash
1e610dd3
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

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

KI-GENERIERT ungeprüft Modell: gemini-3.8-flash-medium · Aufwand: medium · Temperatur: nicht steuerbar · Prompt: 0fe78ab97a32 Herkunft
KI-generiertgemini-3.8-flash-medium · 2026-10-13

Die synchrone Abfragefunktion valid() prüft ohne Parameter, ob eine Instanz von ara::core::Future einen geteilten Zustand (Shared State) besitzt und damit verwendbar ist [SWS_CORE_00327]. Sie liefert true zurück, falls das Objekt einsatzbereit ist, und false, wenn kein geteilter Zustand vorliegt [SWS_CORE_00327]. Das Verhalten entspricht der Standardfunktion std::future::valid und gilt in gleicher Weise für die Templatespezialisierung ara::core::Future<void, E> [SWS_CORE_06227].

Die Funktion ist als noexcept deklariert, gilt als ausnahmesicher (exception safe) und ist ausdrücklich als threadsicher (thread-safe) spezifiziert [SWS_CORE_00327]. Sie löst selbst keine Fehlercodes oder Exceptions aus und kann daher gefahrlos zur Zustandsprüfung herangezogen werden [SWS_CORE_00327].

Im Zusammenspiel mit anderen Methoden von Future ist die Validitätsprüfung entscheidend, da aufrufende Operationen wie wait() [SWS_CORE_00328] oder is_ready() [SWS_CORE_00332] bei ungültigem Zustand (valid() == false) eine FutureInvalidViolation auslösen. Ein zuvor gültiges Future wird automatisch ungültig, sobald sein Ergebnis über get() [SWS_CORE_00326] oder GetResult() [SWS_CORE_00336] konsumiert wird oder eine Weiterverarbeitung über then() [SWS_CORE_00331], [SWS_CORE_00337] registriert wurde.

Dieser Text wurde von einer KI erstellt und dient als Orientierungshilfe. Verbindlich sind ausschließlich die verlinkten AUTOSAR-Spezifikationen.

Implementer's Guide folgt (Komplexität 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#d314fbc3
Content hash
d314fbc3
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

function 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

KI-GENERIERT ungeprüft Modell: gemini-3.8-flash-medium · Aufwand: medium · Temperatur: nicht steuerbar · Prompt: 9635b0074677 Herkunft
KI-generiertgemini-3.8-flash-medium · 2026-10-13

Die Elementfunktion wait der Klasse ara::core::Future blockiert den aufrufenden Thread synchron, bis ein Ergebniswert oder ein Fehler aus der asynchronen Operation verfügbar ist [SWS_CORE_00328]. Die Funktion nimmt keine Parameter entgegen, liefert keinen Rückgabewert und verhält sich gemäß Spezifikation analog zur entsprechenden Funktion aus std::future [SWS_CORE_00328]. Dasselbe Verhalten gilt für die Template-Spezialisierung ara::core::Future<void, E> [SWS_CORE_06228].

Hinsichtlich Fehlerbehandlung und Nebenläufigkeit sind folgende Vorgaben definiert:

  • Fehlerbedingung: Ist das Future-Objekt ungültig (valid == FALSE), liegt eine FutureInvalidViolation vor [SWS_CORE_00328], [SWS_CORE_06228]. Dennoch ist die Funktion als noexcept deklariert und als ausnahmesicher (exception safe) klassifiziert [SWS_CORE_00328].
  • Thread-Sicherheit: Der Aufruf ist explizit als not thread-safe eingestuft [SWS_CORE_00328]. Ein nebenläufiger Zugriff auf dasselbe Future-Objekt ohne externe Synchronisation ist unzulässig.

Im Zusammenspiel mit verwandten Schnittstellen empfiehlt sich vor dem Aufruf die Prüfung mittels is_ready [SWS_CORE_00332], [SWS_CORE_06232]: Liefert diese true zurück, blockiert der Aufruf von wait garantiert nicht mehr. Ist statt unbegrenztem Warten ein zeitlich beschränkter Blockiervorgang gefordert, stehen alternativ wait_for mit einer relativen Zeitdauer [SWS_CORE_00329], [SWS_CORE_06229] sowie wait_until mit einem absoluten Zeitpunkt [SWS_CORE_00330], [SWS_CORE_06230] zur Verfügung.

Dieser Verwendungshinweis wurde automatisiert auf Basis der Spezifikation AUTOSAR Adaptive R25-11 generiert.

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#71020ccc
Content hash
71020ccc
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

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

KI-GENERIERT ungeprüft Modell: gemini-3.8-flash-medium · Aufwand: medium · Temperatur: nicht steuerbar · Prompt: 360b2640b7ed Herkunft Offene Fragen (1)
KI-generiertgemini-3.8-flash-medium · 2026-10-13

Verwendung

Die Elementfunktion wait_for der Klasse ara::core::Future blockiert den aufrufenden Thread für maximal die übergebene Zeitspanne timeoutDuration oder bis ein Ergebniswert beziehungsweise ein Fehler im geteilten Zustand bereitsteht [SWS_CORE_00329]. Ihr Verhalten entspricht der korrespondierenden Funktion aus std::future [SWS_CORE_00329]. Als Rückgabewert liefert sie ein FutureStatus zurück [SWS_CORE_00329], das anzeigt, ob der geteilte Zustand verfügbar ist (kReady) oder die vorgegebene Wartezeit abgelaufen ist (kTimeout) [SWS_CORE_00361].

Fehlerbehandlung und Randbedingungen

Die Funktion ist als noexcept deklariert und als ausnahmesicher (exception safe) spezifiziert [SWS_CORE_00329]. Ist das Future-Objekt ungültig (valid == FALSE), liegt eine Verletzung in Form von FutureInvalidViolation vor [SWS_CORE_00329]. Interpretation: Da keine C++-Ausnahmen geworfen werden dürfen, dürfte eine solche Verletzung plattformseitig als fataler Laufzeitfehler behandelt werden. Frage Q-2f22a07f6e143856 (offen)

Nebenläufigkeit und Zusammenspiel

Die Operation ist als not thread-safe eingestuft [SWS_CORE_00329]; gleichzeitige Zugriffe auf dieselbe Instanz erfordern daher eine externe Synchronisation. Die Semantik und Signatur gelten identisch für die Template-Spezialisierung ara::core::Future<void, E> [SWS_CORE_06229]. Im Unterschied zu std::future_status existiert im Enumerationstyp FutureStatus kein Eintrag für deferred [SWS_CORE_00361].

Dieser Text wurde durch eine KI auf Basis der AUTOSAR-Spezifikation R25-11 generiert.

Implementer's Guide folgt (Komplexität 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#669e5273
Content hash
669e5273
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

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

KI-GENERIERT ungeprüft Modell: gemini-3.8-flash-medium · Aufwand: medium · Temperatur: nicht steuerbar · Prompt: b4703e774b3e Herkunft
KI-generiertgemini-3.8-flash-medium · 2026-10-13

Die Elementfunktion wait_until blockiert den aufrufenden Thread, bis entweder der angegebene absolute Zeitpunkt deadline erreicht ist oder das ara::core::Future ein Ergebnis bzw. einen Fehler bereitstellt [SWS_CORE_00330]. Das Verhalten orientiert sich an der korrespondierenden Funktion von std::future [SWS_CORE_00330].

Als Rückgabewert liefert die Funktion ein FutureStatus [SWS_CORE_00330]. Dieser Enum-Typ signalisiert über den Zustand kReady, dass der geteilte Zustand bereit ist (Wert oder Fehler verfügbar), oder über kTimeout, dass die Frist ohne Ergebnis verstrichen ist [SWS_CORE_00361]. Ein Zustand analog zu std::future_status::deferred existiert in FutureStatus nicht [SWS_CORE_00361].

Hinsichtlich der Fehlerbehandlung und Ausnahme-Sicherheit ist die Funktion als ausnahmesicher (exception safe) und noexcept spezifiziert [SWS_CORE_00330]. Wird die Funktion jedoch auf einer ungültigen Instanz aufgerufen (valid == FALSE), liegt eine Verletzung in Form von FutureInvalidViolation vor [SWS_CORE_00330].

Bezüglich der Nebenläufigkeit ist wait_until als nicht threadsicher (not thread-safe) eingestuft [SWS_CORE_00330]. Parallele Zugriffe auf dasselbe ara::core::Future-Objekt müssen daher extern synchronisiert werden. Dieselbe Semantik und Signatur gilt für die Spezialisierung ara::core::Future<void, E> [SWS_CORE_06230].

Dieser Text wurde von einer KI erstellt und dient als Orientierungshilfe. Maßgeblich ist die Spezifikation.

Implementer's Guide folgt (Komplexität 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#f662b2c4
Content hash
f662b2c4
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

function ~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#16f70bc1
Content hash
16f70bc1
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