DEENESPTFRRUARHIKOZHNL

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

[SWS_CORE_06221] Upstream: RS_AP_00130

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

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

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

Guide utilisateurGÉNÉRÉ PAR IA

Permet d'attendre l'achèvement d'une opération asynchrone sans valeur de retour ainsi que de récupérer l'état d'erreur.
GÉNÉRÉ PAR IA non vérifié Modèle : gemini-3.8-flash-medium · Effort : medium · Température : non réglable · Prompt : e943c154e07e Provenance
traduit du guide allemandgemini-3.8-flash-low · 2026-10-13 · Original allemand

Permet d'attendre l'achèvement d'une opération asynchrone sans valeur de retour ainsi que de récupérer l'état d'erreur.

La classe ara::core::Future<void, E> permet la synchronisation asynchrone et la vérification des erreurs d'opérations sans valeur de retour dans AUTOSAR Adaptive [SWS_CORE_06236]. En tant que type non copiable, elle permet d'attendre l'achèvement ainsi que de récupérer le résultat sans exception sous la forme ara::core::Result<void, E> [SWS_CORE_06236] ou de poursuivre le traitement asynchrone par une fonction de continuation [SWS_CORE_06231]. Après la récupération du résultat, l'état partagé est invalidé, de sorte que les appels ultérieurs sans état valide constituent une violation [SWS_CORE_06236].

Contexte

La spécialisation de classe template ara::core::Future<void, E> représente l'extrémité réceptrice d'une opération asynchrone dans AUTOSAR Adaptive qui, en cas d'achèvement réussi, ne renvoie aucune valeur mais signale uniquement la survenue de l'événement ou une erreur survenue. Selon la description de la classe, l'implémentation doit rejeter la condition E != ara::core::ErrorCode avec une erreur de compilation. La classe interagit typiquement avec un ara::core::Promise correspondant, qui remplit l'état partagé (shared state) [SWS_CORE_06236], ainsi qu'avec des contextes d'exécution asynchrones lors de l'enregistrement de fonctions de continuation [SWS_CORE_06237].

Cycle de vie

Les instances de ara::core::Future<void, E> sont des objets purement sémantiques de déplacement : le constructeur de copie [SWS_CORE_06234] ainsi que l'opérateur d'assignation par copie [SWS_CORE_06235] sont supprimés (delete). Un objet créé via le constructeur par défaut ne possède aucun état partagé et se comporte de manière analogue à std::future [SWS_CORE_06222]. Au moyen de la construction par déplacement [SWS_CORE_06223] ou de l'assignation par déplacement [SWS_CORE_06225], une instance prend possession d'un shared state provenant d'une autre instance.

Le cycle de vie est fortement déterminé par l'état du shared state. La méthode valid() permet de vérifier si l'instance est liée à un shared state et est donc utilisable [SWS_CORE_06227]. Dès que le résultat est récupéré au moyen de GetResult() [SWS_CORE_06236] ou get() [SWS_CORE_06226], ou qu'une continuation est enregistrée via then() [SWS_CORE_06231], l'objet Future perd son shared state et valid() renvoie false. Le destructeur libère un état partagé résiduel [SWS_CORE_06233]. En matière de concurrence, les opérations de vérification et de destruction telles que valid() [SWS_CORE_06227], is_ready() [SWS_CORE_06232] et le destructeur [SWS_CORE_06233] sont sûres pour les threads (thread-safe), tandis que les opérations modifiant l'état telles que GetResult() [SWS_CORE_06236], get() [SWS_CORE_06226] et les fonctions d'attente [SWS_CORE_06228] ne sont pas sûres pour les threads.

future_states Ungueltig Invalide (valid() == false) Ausstehend Valide / En attente (valid() == true, is_ready() == false) Ungueltig->Ausstehend Move-Konstruktion / Zuweisung Ausstehend->Ungueltig then() Bereit Valide / Prêt (valid() == true, is_ready() == true) Ausstehend->Bereit Promise setzt Wert / Fehler Bereit->Ungueltig GetResult() / get() Bereit->Ungueltig then()

Diagramme d'états : transitions d'état et validité de ara::core::Future<void, E>. Sources : [SWS_CORE_06222], [SWS_CORE_06226], [SWS_CORE_06227], [SWS_CORE_06231], [SWS_CORE_06232], [SWS_CORE_06233], [SWS_CORE_06236]

Parcours d'utilisation

Dans le chemin d'utilisation synchrone, un consommateur attend la fin de l'opération asynchrone. is_ready() permet de vérifier avec peu de blocage si une valeur ou une erreur est présente [SWS_CORE_06232]. Alternativement, il est possible d'attendre de manière bloquante au moyen de wait() [SWS_CORE_06228], ou pendant une durée limitée via wait_for() [SWS_CORE_06229] et wait_until() [SWS_CORE_06230]. Dès que le résultat est disponible, la récupération de la valeur s'effectue de préférence sans exception via GetResult(), renvoyant ainsi un ara::core::Result<void, E> [SWS_CORE_06236].

Dans le chemin asynchrone, la méthode then() permet l'enregistrement d'une fonction de continuation (continuation) qui est exécutée dès que le résultat est disponible [SWS_CORE_06231]. À cet égard, un contexte d'exécution (executor) peut optionnellement être transmis [SWS_CORE_06237]. La continuation reçoit le Result<void, E> en tant que rvalue. Le type de retour de then() déballe automatiquement les types Future ou Result imbriqués (unwrapping) [SWS_CORE_06231].

Récupération synchrone du résultat via GetResultApplicationFutureSharedStatevalid()trueis_ready()Vérifier l'étattrue (résultat ou erreur prêt)trueGetResult()std::move(Ergebnis)Result<void, E>Invalider le shared state (valid() == false)Result<void, E>

Diagramme de séquence : déroulement synchrone pour la récupération du résultat via GetResult. Sources : [SWS_CORE_06227], [SWS_CORE_06228], [SWS_CORE_06232], [SWS_CORE_06236]

Scénarios d'erreur

Si une opération dépendante de l'état (telle que GetResult(), is_ready(), wait(), wait_for(), wait_until() ou then()) est appelée sur une instance invalide (valid() == false), il s'agit d'une violation de précondition traitée comme FutureInvalidViolation [SWS_CORE_06228], [SWS_CORE_06229], [SWS_CORE_06230], [SWS_CORE_06231], [SWS_CORE_06232], [SWS_CORE_06236], [SWS_CORE_06237]. En cas d'appel de get() sur une instance invalide, une FutureException avec le code d'erreur kNoState est levée à la place [SWS_CORE_06226] ; lorsque les exceptions C++ sont désactivées, get() ne participe pas à la résolution de surcharge [SWS_CORE_06226].

Si la Promise correspondante a été détruite ou a quitté l'état partagé sans définir de résultat ou d'erreur explicite, le code d'erreur FutureErrc::kBrokenPromise est consigné dans le shared state conformément à [SWS_CORE_00400] [SWS_CORE_06226], [SWS_CORE_06236]. Celui-ci est renvoyé par GetResult() en tant qu'erreur dans le Result<void, E> [SWS_CORE_06236]. Si une continuation enregistrée dans then() lève une exception qui n'implémente pas une violation, cela conduit à FutureContinuationHasThrownViolation [SWS_CORE_06231], [SWS_CORE_06237].

Ce guide est basé exclusivement sur la spécification AUTOSAR pour ara::core::Future<void, E> dans la Release R25-11.

Carte des membres

Constructeurs et destructeur

2

Opérateurs

1

Diagramme de classes

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

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

Vue détaillée

Sélectionnez une entrée dans le plan.

Constructeurs et destructeur

Future fonction 3

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

Surcharges Future 3
Future () noexcept; SWS_CORE_06222
Future (Future &&other) noexcept; SWS_CORE_06223
Future (const Future &other)=delete; SWS_CORE_06234
~Future fonction

Destructor for Future objects. Abandons any shared state

~Future () noexcept;

Méthodes

get fonction

Returns nothing. This function shall behave the same as the corresponding std::future function. Part of the behavior taken from the std::future is that after a call to this function the Future is not valid anymore (valid() == false). ≙ std::future

void get () noexcept(false);
GetResult fonction

Get the result. Similar to Future::get(), this call blocks until the value or an error is available. However, this call will never throw an exception. Part of the behavior taken from Future::get() is that after a call to this function the Future is not valid anymore (valid() == false).

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

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

bool is_ready () const noexcept;
then fonction 2

Create a new Future with the content returned by func when passed the Result of this Future. func may be called in the context of this call or in the context of Promise::set_value() or Promise::SetError() or somewhere else. valid() == false on the original future object immediately after it returns. The Callable input argument "func" takes a Result<void,E> object as parameter. This will be the Result obtained via GetResult from the Future instance itself, on which .then() is being called. The Result is passed to func as an rvalue expression. The return type of then depends on the return type of func (aka continuation). Let U be the return type of the continuation (i.e. a type equivalent to std::invoke_result_ t<std::decay_t<F>,Result<void,E>>). • If U is Future<T2,E2> for some types T2, E2, then the return type of then() is Future<T2,E2>. This is known as implicit Future unwrapping. • If U is Result<T2,E2> for some types T2, E2, then the return type of then() is Future<T2,E2>. This is known as implicit Result unwrapping. • Otherwise it is Future<U,E>. Continuations that are registered with Future::then() are registered in the Future F that Future::then() returns. No such continuation shall be executed after the destructor of the Future F returns. A continuation that is already being executed shall run to completion. Note: that means that the destructor of Future might block until the currently running continuation has been completed. The continuation shall not throw, except for the purpose of implementing a Violation. Note: Exceptions can be used within the continuation, however if they do not realize a Violation, they must not escape the continuation. Note: Users who need to propagate information from closures’ exceptions should translate them to an error and return an ara::core::Result or ara::core::Future from the continuation with the error stored in it. ≙ std::invoke_result_

Surcharges then 2
template <typename F> auto then (F &&func) noexcept -> Future< <see below> >; SWS_CORE_06231
template <typename F, typename ExecutorT> auto then (F &&func, ExecutorT &&executor) noexcept -> Future< <see below> >; SWS_CORE_06237
valid fonction

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

bool valid () const noexcept;
wait fonction

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

void wait () const noexcept;
wait_for fonction

Wait for the given period, or until a value or an error is available. This function shall behave the same as the corresponding std::future function ≙ std::future

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

Wait until the given time, or until a value or an error is available. This function shall behave the same as the corresponding std::future function. ≙ std::future

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

Opérateurs

operator= fonction 2

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

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

Documentation des méthodes

fonction Future [SWS_CORE_06222] Upstream: RS_AP_00130

Future () noexcept;

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

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

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

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

fonction Future [SWS_CORE_06223] Upstream: RS_AP_00130

Future (Future &&other) noexcept;

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

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

Parameter (in)

ParameterBeschreibung
otherthe other instance

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

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

fonction Future [SWS_CORE_06234] Upstream: RS_AP_00130

Future (const Future &other)=delete;

Copy constructor shall be disabled

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

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

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

fonction GetResult [SWS_CORE_06236] Upstream: RS_AP_00130

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

Get the result. Similar to Future::get(), this call blocks until the value or an error is available. However, this call will never throw an exception. Part of the behavior taken from Future::get() is that after a call to this function the Future is not valid anymore (valid() == false).

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

Rückgabewert

TypBeschreibung
Result< void, E >a Result as std::move(result from the shared state) with either a value or an error that has been put into the corresponding Promise. This can be because either: • explicit setting of the Error via Promise::SetError / Promise::Set Result or • the Promise was broken, meaning the shared state was abandoned by the corresponding Promise. Then the error is kBrokenPromise as defined in [SWS_CORE_00400]

Fehler

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

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

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

fonction get [SWS_CORE_06226] Upstream: RS_AP_00130

void get () noexcept(false);

Returns nothing. This function shall behave the same as the corresponding std::future function. Part of the behavior taken from the std::future is that after a call to this function the Future is not valid anymore (valid() == false).

GÉNÉRÉ PAR IA non vérifié Modèle : gemini-3.8-flash-medium · Effort : medium · Température : non réglable · Prompt : 195e9e272b48 Provenance
traduit du guide allemandgemini-3.8-flash-low · 2026-10-13 · Original allemand

La fonction membre get de la spécialisation ara::core::Future<void, E> sert à attendre le résultat d'une opération asynchrone sans valeur de retour ([SWS_CORE_06226]). Elle se comporte comme la fonction correspondante de std::future et bloque l'appelant jusqu'à ce que le résultat ou une erreur soit disponible ([SWS_CORE_06226], [SWS_CORE_00336]). Après l'appel, l'instance de future perd sa validité, de sorte que valid() == false s'applique ([SWS_CORE_06226]).

La fonction est déclarée non sûre vis-à-vis des exceptions (not exception safe) ([SWS_CORE_06226]). Si une erreur a été consignée dans le Promise associé, une exception correspondante est déclenchée ([SWS_CORE_06226]). Si l'état partagé a été abandonné prématurément, le code d'erreur kBrokenPromise selon [SWS_CORE_00400] survient ([SWS_CORE_06226]). Si get est exécutée sur une instance déjà invalide, la fonction lève une FutureException avec le code d'erreur kNoState ([SWS_CORE_06226]).

En matière de concurrence, la méthode n'est pas thread-safe (not thread-safe) ([SWS_CORE_06226]). Les accès parallèles au même objet nécessitent donc une synchronisation externe. De plus, la fonction ne participe pas à la résolution de surcharge lorsque les exceptions C++ sont désactivées dans la chaîne d'outils du compilateur ([SWS_CORE_06226]).

En interaction avec des fonctions apparentées, [SWS_CORE_00332] (is_ready) garantit que get ne bloque pas si l'opération est déjà terminée. Pour les contextes sans exceptions, AUTOSAR propose comme alternative [SWS_CORE_00336] (GetResult), qui signale les erreurs via un type de résultat au lieu de lever des exceptions.

Ce texte a été généré par une IA et sert de guide d'orientation ; seule la spécification AUTOSAR fait foi.

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

Rückgabewert

TypBeschreibung
None

Exceptions

Any exception of the type associated with the error that has been put into the corresponding Promise. This can be because either: • explicit setting of the Error via: Promise::SetError(E&&) Promise::SetError(const E&) / Promise::SetResult(const Result<T, E>&) Promise::SetResult(Result <T, E>&&) • the Promise was broken, meaning the shared state was abandoned by the corresponding Promise. Then the error is kBrokenPromise as defined in [SWS_CORE_00400]. FutureException in case the Future is invalid. The contained ErrorCode is kNoState

Hinweise: This function shall not participate in overload resolution when C++ exceptions are disabled in the compiler toolchain

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

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

fonction is_ready [SWS_CORE_06232] Upstream: RS_AP_00130

bool is_ready () const noexcept;

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

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

Rückgabewert

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

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

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

fonction operator= [SWS_CORE_06225] Upstream: RS_AP_00130

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

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

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

Parameter (in)

ParameterBeschreibung
otherthe other instance

Rückgabewert

TypBeschreibung
Future &*this

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

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

fonction operator= [SWS_CORE_06235] Upstream: RS_AP_00130

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

Copy assignment operator shall be disabled

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

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

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

fonction then [SWS_CORE_06231] Upstream: RS_AP_00130

template <typename F> auto then (F &&func) noexcept -> Future< <see below> >;

Create a new Future with the content returned by func when passed the Result of this Future. func may be called in the context of this call or in the context of Promise::set_value() or Promise::SetError() or somewhere else. valid() == false on the original future object immediately after it returns. The Callable input argument "func" takes a Result<void,E> object as parameter. This will be the Result obtained via GetResult from the Future instance itself, on which .then() is being called. The Result is passed to func as an rvalue expression. The return type of then depends on the return type of func (aka continuation). Let U be the return type of the continuation (i.e. a type equivalent to std::invoke_result_ t<std::decay_t<F>,Result<void,E>>). • If U is Future<T2,E2> for some types T2, E2, then the return type of then() is Future<T2,E2>. This is known as implicit Future unwrapping. • If U is Result<T2,E2> for some types T2, E2, then the return type of then() is Future<T2,E2>. This is known as implicit Result unwrapping. • Otherwise it is Future<U,E>. Continuations that are registered with Future::then() are registered in the Future F that Future::then() returns. No such continuation shall be executed after the destructor of the Future F returns. A continuation that is already being executed shall run to completion. Note: that means that the destructor of Future might block until the currently running continuation has been completed. The continuation shall not throw, except for the purpose of implementing a Violation. Note: Exceptions can be used within the continuation, however if they do not realize a Violation, they must not escape the continuation. Note: Users who need to propagate information from closures’ exceptions should translate them to an error and return an ara::core::Result or ara::core::Future from the continuation with the error stored in it.

GÉNÉRÉ PAR IA non vérifié Modèle : gemini-3.8-flash-medium · Effort : medium · Température : non réglable · Prompt : 161f9bad96ab Provenance
traduit du guide allemandgemini-3.8-flash-low · 2026-10-13 · Original allemand

Utilisation

La méthode then enregistre une opération consécutive (continuation func) sur une instance de ara::core::Future<void, E> [SWS_CORE_06231]. L'objet appelable reçoit le résultat de l'opération sous la forme d'une expression rvalue de type Result<void, E>, fournie en interne via GetResult [SWS_CORE_06231]. L'appel de func peut s'effectuer de manière synchrone dans le contexte de then ou de manière asynchrone dans le contexte de Promise::set_value(), de Promise::SetError() ou ailleurs [SWS_CORE_06231].

Immédiatement après le retour de then, le future d'origine est invalide (valid() == false) [SWS_CORE_06231]. Le type de retour s'adapte au type de retour U de la continuation :

  • Si func renvoie un Future<T2, E2>, un déballage implicite a lieu et then renvoie Future<T2, E2> [SWS_CORE_06231].
  • Si func renvoie un Result<T2, E2>, celui-ci est également déballé implicitement en Future<T2, E2> [SWS_CORE_06231].
  • Dans tous les autres cas, le type de retour est Future<U, E> [SWS_CORE_06231].

Gestion des erreurs et conditions limites

Aucun code d'erreur standardisé n'est spécifié pour cette fonction [SWS_CORE_06231]. La méthode est déclarée comme noexcept, mais définit deux violations (violations) :

  • FutureInvalidViolation : survient lorsque la méthode est appelée sur un future invalide (si valid() renvoie false) [SWS_CORE_06231].
  • FutureContinuationHasThrownViolation : survient lorsque la continuation lève une exception qui n'implémente pas une violation [SWS_CORE_06231]. Les erreurs dans la continuation doivent être renvoyées à la place encapsulées dans un Result ou un Future [SWS_CORE_06231].

Concurrence et interaction

La méthode n'est pas thread-safe (not thread-safe) [SWS_CORE_06231]. Après le retour du destructeur du future renvoyé, plus aucune continuation enregistrée n'est exécutée ; toutefois, une exécution déjà en cours est menée à son terme, de sorte que le destructeur peut bloquer [SWS_CORE_06231]. Tandis que [SWS_CORE_06231] s'applique à Future<void, E>, [SWS_CORE_00331] décrit la variante pour les futures typés Future<T, E> et [SWS_CORE_06237] la surcharge avec un exécuteur explicite.

Ce texte a été généré par une IA sur la base de la spécification AUTOSAR.

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

Parameter (in)

ParameterBeschreibung
funca callable to register

Rückgabewert

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

Fehler

FehlercodeBeschreibung
This function does not specify any standardized errors.

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

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

fonction then [SWS_CORE_06237] Upstream: RS_AP_00130

template <typename F, typename ExecutorT> auto then (F &&func, ExecutorT &&executor) noexcept -> Future< <see below> >;

Create a new Future with the content returned by func when passed the Result of this Future. func is called in the context of the provided execution context executor. valid() == false on the original future object immediately after it returns. The Callable input argument "func" takes a Result<void,E> object as parameter. This will be the Result obtained via GetResult from the Future instance itself, on which .then() is being called. The Result is passed to func as an rvalue expression. The return type of then depends on the return type of func (aka continuation). Let U be the return type of the continuation (i.e. a type equivalent to std::invoke_result_ t<std::decay_t<F>,Result<void,E>>). • If U is Future<T2,E2> for some types T2, E2, then the return type of then() is Future<T2,E2>. This is known as implicit Future unwrapping. • If U is Result<T2,E2> for some types T2, E2, then the return type of then() is Future<T2,E2>. This is known as implicit Result unwrapping. • Otherwise it is Future<U,E>. Continuations that are registered with Future::then() are registered in the Future F that Future::then() returns. No such continuation shall be executed after the destructor of the Future F returns. A continuation that is already being executed shall run to completion. Note: that means that the destructor of Future might block until the currently running continuation has been completed. The continuation shall not throw, except for the purpose of implementing a Violation. Note: Exceptions can be used within the continuation, however if they do not realize a Violation, they must not escape the continuation. Note: Users who need to propagate information from closures’ exceptions should translate them to an error and return an ara::core::Result or ara::core::Future from the continuation with the error stored in it.

GÉNÉRÉ PAR IA non vérifié Modèle : gemini-3.8-flash-medium · Effort : medium · Température : non réglable · Prompt : 96d3b0e93b60 Provenance
traduit du guide allemandgemini-3.8-flash-low · 2026-10-13 · Original allemand

La fonction then enregistre un objet de continuation appelable func sur une instance de ara::core::Future<void, E> pour exécution dans le contexte d'exécution spécifié executor [SWS_CORE_06237]. Immédiatement après le retour de then, l'instance de future appelante perd sa validité, de sorte que valid() == false est vérifié [SWS_CORE_06237]. La continuation reçoit le résultat de l'instance de future d'origine passé comme Result<void, E> sous forme d'une expression rvalue [SWS_CORE_06237]. Comme valeur de retour, l'appel fournit une nouvelle instance de Future, les types de retour de la continuation de type Future<T2, E2> ou Result<T2, E2> étant implicitement déballés en Future<T2, E2> ; sinon, un Future<U, E> est retourné [SWS_CORE_06237].

En matière de concurrence et de cycle de vie, la fonction est spécifiée comme n'étant pas thread-safe (not thread-safe) [SWS_CORE_06237]. La continuation est enregistrée dans le nouveau future retourné. Après le retour du destructeur de ce nouveau future, aucune continuation ne doit plus être exécutée ; une continuation déjà en cours d'exécution s'exécute toutefois complètement jusqu'à son terme, raison pour laquelle le destructeur du future peut bloquer [SWS_CORE_06237].

La fonction ne déclare aucun code d'erreur standardisé et est définie comme noexcept [SWS_CORE_06237]. Si elle est appelée sur une instance de future non valide, la violation FutureInvalidViolation se produit [SWS_CORE_06237]. Dans la mesure où la continuation lève une exception, cela conduit à la violation FutureContinuationHasThrownViolation [SWS_CORE_06237]. Les exceptions ne doivent pas quitter la continuation, mais doivent être traduites au besoin en valeurs d'erreur et retournées à l'intérieur d'un Result ou Future [SWS_CORE_06237]. La fonction complète la variante sans exécuteur [SWS_CORE_06231] et constitue le pendant des surcharges avec valeur [SWS_CORE_00331] ainsi que [SWS_CORE_00337].

Cette note d'utilisation a été créée par une IA et est basée sur la spécification AUTOSAR R25-11.

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

Template-Parameter

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

Parameter (in)

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

Rückgabewert

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

Fehler

FehlercodeBeschreibung
This function does not specify any standardized errors.

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

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

fonction valid [SWS_CORE_06227] Upstream: RS_AP_00130

bool valid () const noexcept;

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

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

GÉNÉRÉ PAR IA non vérifié Modèle : gemini-3.8-flash-medium · Effort : medium · Température : non réglable · Prompt : 480112e5c811 Provenance
traduit du guide allemandgemini-3.8-flash-low · 2026-10-13 · Original allemand

La fonction valid() vérifie de manière synchrone si l'instance de ara::core::Future<void, E> possède un état partagé (Shared State) et est ainsi utilisable [SWS_CORE_06227]. Conformément à la spécification, elle se comporte de manière analogue à la fonction correspondante de std::future [SWS_CORE_06227]. Comme valeur de retour, elle fournit true si le future est utilisable, et false s'il n'est pas utilisable [SWS_CORE_06227].

En ce qui concerne la concurrence et le traitement des erreurs, la méthode est déclarée comme noexcept, sûre vis-à-vis des exceptions (exception safe) et expressément spécifiée comme thread-safe [SWS_CORE_06227]. Elle peut ainsi être appelée en toute sécurité depuis des contextes concurrents.

En interaction avec d'autres opérations, valid() sert à sécuriser le cycle de vie :

  • Si une opération telle que wait() [SWS_CORE_06228] ou is_ready() [SWS_CORE_00332] est appelée sur un objet future non valide (valid() == false), cela déclenche la violation FutureInvalidViolation.
  • Les opérations de consommation invalident l'objet : après un appel de get(), le future n'est plus valide, de sorte que les vérifications ultérieures avec valid() donnent la valeur false [SWS_CORE_06226].
  • De même, les transmissions via then() [SWS_CORE_00331] ou les appels de GetResult() [SWS_CORE_00336] entraînent l'invalidation immédiate de l'objet future d'origine.

Cette note d'utilisation a été générée par une IA sur la base de la spécification.

Guide de l'implémenteur à venir (complexité I1)

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

Rückgabewert

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

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

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

fonction wait [SWS_CORE_06228] Upstream: RS_AP_00130

void wait () const noexcept;

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

GÉNÉRÉ PAR IA non vérifié Modèle : gemini-3.8-flash-medium · Effort : medium · Température : non réglable · Prompt : 2f9ee5ecd1d4 Provenance Questions ouvertes (1)
traduit du guide allemandgemini-3.8-flash-low · 2026-10-13 · Original allemand

La fonction membre wait de la spécialisation ara::core::Future<void, E> bloque le thread appelant de manière synchrone jusqu'à ce que le résultat de l'opération asynchrone soit disponible sous la forme d'une valeur ou d'une erreur [SWS_CORE_06228]. La fonction ne prend aucun paramètre, ne renvoie aucune valeur de retour (void) et se comporte conformément à la spécification comme la fonction correspondante de std::future [SWS_CORE_06228].

Concernant le traitement des erreurs et les conditions aux limites, les exigences suivantes s'appliquent :

  • Sécurité vis-à-vis des exceptions et traitement des erreurs : L'opération est déclarée avec noexcept et spécifiée comme sûre vis-à-vis des exceptions (exception safe) [SWS_CORE_06228]. Si valid() renvoie false pour l'instance de future, la violation FutureInvalidViolation est présente [SWS_CORE_06228]. La conséquence concrète de cette violation devrait être mise en œuvre sous forme d'un traitement d'erreurs spécifique au système de l'environnement d'exécution AUTOSAR. Question Q-469e9abc947b9869 (ouverte)
  • Concurrence : La fonction est classée comme non thread-safe (not thread-safe) [SWS_CORE_06228]. Un accès concurrent au même objet future sans synchronisation externe est donc inadmissible.

En interaction avec les autres fonctions du module core, les possibilités suivantes existent :

  • La méthode thread-safe is_ready permet de vérifier au préalable si l'opération est terminée ; en cas de retour de true, wait est garanti de ne plus bloquer [SWS_CORE_06232].
  • Pour éviter un blocage infini, les fonctions limitées dans le temps wait_for avec une durée relative [SWS_CORE_06229] ainsi que wait_until avec un instant absolu [SWS_CORE_06230] sont disponibles.
  • Pour la classe de modèle primaire ara::core::Future, les mêmes exigences d'attente synchrone et restrictions s'appliquent [SWS_CORE_00328].

Ce texte a été organisé par un système d'IA et repose exclusivement sur la spécification AUTOSAR.

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

Rückgabewert

TypBeschreibung
None

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

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

fonction wait_for [SWS_CORE_06229] Upstream: RS_AP_00130

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

Wait for the given period, or until a value or an error is available. This function shall behave the same as the corresponding std::future function

GÉNÉRÉ PAR IA non vérifié Modèle : gemini-3.8-flash-medium · Effort : medium · Température : non réglable · Prompt : 927a98d78cf3 Provenance Questions ouvertes (1)
traduit du guide allemandgemini-3.8-flash-low · 2026-10-13 · Original allemand

La méthode wait_for de la spécialisation ara::core::Future<void, E> bloque le thread appelant de manière synchrone pendant un laps de temps maximal timeoutDuration ou jusqu'à ce que le résultat soit disponible [SWS_CORE_06229]. Elle se comporte sémantiquement comme la fonction standard correspondante std::future::wait_for [SWS_CORE_06229].

Comme valeur de retour, la fonction fournit l'état FutureStatus [SWS_CORE_06229]. Celui-ci signale avec FutureStatus::kReady qu'une valeur ou une erreur est disponible, ou avec FutureStatus::kTimeout que l'échéance a expiré sans résultat [SWS_CORE_00361]. Un état équivalent à std::future_status::deferred n'est pas prévu [SWS_CORE_00361]. Le comportement correspond à l'interface générale de future [SWS_CORE_00329].

Pour l'appel, les conditions suivantes s'appliquent en matière de concurrence et de traitement des erreurs :

  • Concurrence : la fonction est spécifiée comme n'étant pas thread-safe (not thread-safe) [SWS_CORE_06229]. Les appels simultanés sur la même instance doivent être sécurisés du côté de l'appelant.
  • Cas d'erreur et sécurité vis-à-vis des exceptions : l'opération est déclarée comme sûre vis-à-vis des exceptions (exception safe) ainsi que noexcept [SWS_CORE_06229]. Si l'objet Future n'est pas valide (valid() fournit false), il y a une FutureInvalidViolation [SWS_CORE_06229]. En raison de la déclaration noexcept, cette violation devrait probablement conduire à un arrêt immédiat du programme. Question Q-4f01aa6e7fbfb12d (ouverte)

Cette note d'utilisation a été générée de manière automatisée sur la base de la spécification d'AUTOSAR Adaptive R25-11.

Guide de l'implémenteur à venir (complexité I1)

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

Parameter (in)

ParameterBeschreibung
timeoutDurationmaximal duration to wait for

Rückgabewert

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

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

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

fonction wait_until [SWS_CORE_06230] Upstream: RS_AP_00130

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

Wait until the given time, or until a value or an error is available. This function shall behave the same as the corresponding std::future function.

GÉNÉRÉ PAR IA non vérifié Modèle : gemini-3.8-flash-medium · Effort : medium · Température : non réglable · Prompt : 932b0d674f17 Provenance
traduit du guide allemandgemini-3.8-flash-low · 2026-10-13 · Original allemand

La fonction membre wait_until de la spécialisation ara::core::Future<void, E> bloque le thread appelant jusqu'à ce que l'instant absolu spécifié deadline soit atteint ou qu'une valeur ou une erreur soit disponible [SWS_CORE_06230]. La fonction présente le même comportement que la fonction standard C++ correspondante std::future::wait_until [SWS_CORE_06230] et possède la même sémantique que la surcharge générique pour ara::core::Future [SWS_CORE_00330].

La valeur de retour de type FutureStatus signale si l'échéance a été atteinte ou si une valeur est disponible [SWS_CORE_06230]. Ici, l'état kReady indique que l'état partagé est prêt, tandis que kTimeout signifie que l'état partagé n'est pas devenu prêt avant l'expiration de l'échéance [SWS_CORE_00361]. Un état analogue à std::future_status::deferred n'existe pas dans FutureStatus [SWS_CORE_00361].

Concernant l'exécution et les conditions aux limites, les exigences suivantes sont définies :

  • Contexte d'appel et comportement vis-à-vis des exceptions : la fonction est disponible via le fichier d'en-tête #include "ara/core/future.h", déclarée comme noexcept et spécifiée comme sûre vis-à-vis des exceptions (exception safe) [SWS_CORE_06230].
  • États d'erreur : si le future n'est pas valide, c'est-à-dire si valid() renvoie la valeur false, la violation FutureInvalidViolation est présente [SWS_CORE_06230].
  • Concurrence : l'opération est classée comme n'étant pas thread-safe (not thread-safe) [SWS_CORE_06230].

Cette note d'utilisation a été générée automatiquement sur la base de la spécification d'AUTOSAR Adaptive R25-11.

Guide de l'implémenteur à venir (complexité I1)

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

Parameter (in)

ParameterBeschreibung
deadlinelatest point in time to wait

Rückgabewert

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

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

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

fonction ~Future [SWS_CORE_06233] Upstream: RS_AP_00130

~Future () noexcept;

Destructor for Future objects. Abandons any shared state

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

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

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