Maakt het mogelijk te wachten op de voltooiing van een asynchrone operatie zonder retourwaarde en de foutstatus op te halen.
DOOR AI GEGENEREERDongecontroleerdModel: gemini-3.8-flash-medium · Inspanning: medium · Temperatuur: niet regelbaar · Prompt: e943c154e07eHerkomst
vertaald uit de Duitse handleidinggemini-3.8-flash-low · 2026-10-13 · Duits origineel
Maakt het mogelijk te wachten op de voltooiing van een asynchrone operatie zonder retourwaarde en de foutstatus op te halen.
De klasse ara::core::Future<void, E> maakt asynchrone synchronisatie en foutcontrole mogelijk van operaties zonder retourwaarde in AUTOSAR Adaptive [SWS_CORE_06236]. Als niet-kopieerbaar type staat zij het wachten op voltooiing toe, evenals het exceptieveilig ophalen van resultaten als ara::core::Result<void, E>[SWS_CORE_06236] of asynchrone verdere verwerking via een vervolgfunctie [SWS_CORE_06231]. Na afhaling van het resultaat wordt de gedeelde toestand geïnvalideerd, zodat vervolgaanroepen zonder geldige toestand een schending vormen [SWS_CORE_06236].
Context
De templateklas-specialisatie ara::core::Future<void, E> vertegenwoordigt het ontvangende uiteinde van een asynchrone operatie in AUTOSAR Adaptive die bij succesvolle voltooiing geen waarde oplevert, maar louter het optreden van de gebeurtenis of een opgetreden fout signaleert. Volgens de klassenbeschrijving moet de implementatie de voorwaarde E != ara::core::ErrorCode beantwoorden met een compilatiefout. De klasse interageert doorgaans met een corresponderende ara::core::Promise, die de gedeelde toestand (shared state) vult [SWS_CORE_06236], evenals met asynchrone executiecontexten bij het registreren van vervolgfuncties [SWS_CORE_06237].
Levenscyclus
Instanties van ara::core::Future<void, E> zijn pure move-semantiek-objecten: de copy constructor [SWS_CORE_06234] en de copy assignment operator [SWS_CORE_06235] zijn verwijderd (delete). Een via de standaardconstructor aangemaakt object heeft geen gedeelde toestand en gedraagt zich analoog aan std::future[SWS_CORE_06222]. Door middel van verplaatsingsconstructie [SWS_CORE_06223] of verplaatsingstoewijzing [SWS_CORE_06225] neemt een instantie het eigendom van een shared state over van een andere instantie.
De levenscyclus wordt in grote mate bepaald door de toestand van de shared state. Via de methode valid() kan worden gecontroleerd of de instantie aan een shared state gebonden is en daarmee bruikbaar is [SWS_CORE_06227]. Zodra het resultaat door middel van GetResult()[SWS_CORE_06236] of get()[SWS_CORE_06226] wordt opgehaald of een vervolgactie via then()[SWS_CORE_06231] wordt geregistreerd, verliest het future-object zijn shared state en levert valid()false op. De destructor geeft een resterende gedeelde toestand vrij [SWS_CORE_06233]. Met betrekking tot concurrency zijn controle- en vernietigingsoperaties zoals valid()[SWS_CORE_06227], is_ready()[SWS_CORE_06232] en de destructor [SWS_CORE_06233] thread-safe, terwijl toestandswijzigende operaties zoals GetResult()[SWS_CORE_06236], get()[SWS_CORE_06226] en de wachtfuncties [SWS_CORE_06228] niet thread-safe zijn.
In het synchrone gebruikspad wacht een consument op de voltooiing van de asynchrone operatie. Met is_ready() kan met weinig blokkering worden opgevraagd of er een waarde of een fout aanwezig is [SWS_CORE_06232]. Als alternatief kan door middel van wait() blokkerend worden gewacht [SWS_CORE_06228], of tijdsbegrensd via wait_for()[SWS_CORE_06229] en wait_until()[SWS_CORE_06230]. Is het resultaat beschikbaar, dan vindt het opvragen van de waarde bij voorkeur exceptieveilig plaats via GetResult(), waardoor een ara::core::Result<void, E> wordt geretourneerd [SWS_CORE_06236].
In het asynchrone pad maakt de methode then() de registratie van een vervolgfunctie (continuation) mogelijk, die wordt uitgevoerd zodra het resultaat beschikbaar is [SWS_CORE_06231]. Hierbij kan optioneel een executiecontext (executor) worden doorgegeven [SWS_CORE_06237]. De continuation neemt de Result<void, E> als rvalue in ontvangst. Het retourtype van then() pakt geneste Future- of Result-typen automatisch uit (unwrapping) [SWS_CORE_06231].
Als een toestandsafhankelijke operatie (zoals GetResult(), is_ready(), wait(), wait_for(), wait_until() of then()) wordt aangeroepen op een ongeldige instantie (valid() == false), is er sprake van een schending van de preconditie, die wordt behandeld als FutureInvalidViolation[SWS_CORE_06228], [SWS_CORE_06229], [SWS_CORE_06230], [SWS_CORE_06231], [SWS_CORE_06232], [SWS_CORE_06236], [SWS_CORE_06237]. Bij het aanroepen van get() op een ongeldige instantie wordt in plaats daarvan een FutureException met de foutcode kNoState gegenereerd [SWS_CORE_06226]; get() neemt bij uitgeschakelde C++-exceptions niet deel aan overload resolution [SWS_CORE_06226].
Werd de corresponderende promise vernietigd of heeft deze de gedeelde toestand verlaten zonder een resultaat of een expliciete fout in te stellen, dan wordt de foutcode FutureErrc::kBrokenPromise conform [SWS_CORE_00400] vastgelegd in de shared state [SWS_CORE_06226], [SWS_CORE_06236]. Deze wordt door GetResult() als fout in de Result<void, E> geretourneerd [SWS_CORE_06236]. Als een in then() geregistreerde continuation een exceptie genereert die geen schending implementeert, leidt dit tot FutureContinuationHasThrownViolation[SWS_CORE_06231], [SWS_CORE_06237].
Deze handleiding is uitsluitend gebaseerd op de AUTOSAR-specificatie voor ara::core::Future<void, E> in Release R25-11.
Returns nothing. This function shall behave the same as the corresponding std::future function. Part of the behavior taken from the std::future is that after a call to this function the Future is not valid anymore (valid() == false). ≙ std::future
Get the result. Similar to Future::get(), this call blocks until the value or an error is available. However, this call will never throw an exception. Part of the behavior taken from Future::get() is that after a call to this function the Future is not valid anymore (valid() == false).
Return whether the asynchronous operation has finished. If this function returns true, get(), Get Result() and the wait calls are guaranteed not to block.
Create a new Future with the content returned by func when passed the Result of this Future. func may be called in the context of this call or in the context of Promise::set_value() or Promise::SetError() or somewhere else. valid() == false on the original future object immediately after it returns. The Callable input argument "func" takes a Result<void,E> object as parameter. This will be the Result obtained via GetResult from the Future instance itself, on which .then() is being called. The Result is passed to func as an rvalue expression. The return type of then depends on the return type of func (aka continuation). Let U be the return type of the continuation (i.e. a type equivalent to std::invoke_result_ t<std::decay_t<F>,Result<void,E>>). • If U is Future<T2,E2> for some types T2, E2, then the return type of then() is Future<T2,E2>. This is known as implicit Future unwrapping. • If U is Result<T2,E2> for some types T2, E2, then the return type of then() is Future<T2,E2>. This is known as implicit Result unwrapping. • Otherwise it is Future<U,E>. Continuations that are registered with Future::then() are registered in the Future F that Future::then() returns. No such continuation shall be executed after the destructor of the Future F returns. A continuation that is already being executed shall run to completion. Note: that means that the destructor of Future might block until the currently running continuation has been completed. The continuation shall not throw, except for the purpose of implementing a Violation. Note: Exceptions can be used within the continuation, however if they do not realize a Violation, they must not escape the continuation. Note: Users who need to propagate information from closures’ exceptions should translate them to an error and return an ara::core::Result or ara::core::Future from the continuation with the error stored in it. ≙ std::invoke_result_
Overloadsthen2
template <typename F> auto then (F &&func) noexcept -> Future< <see below> >;SWS_CORE_06231
template <typename F, typename ExecutorT> auto then (F &&func, ExecutorT &&executor) noexcept -> Future< <see below> >;SWS_CORE_06237
Wait for the given period, or until a value or an error is available. This function shall behave the same as the corresponding std::future function ≙ std::future
Wait until the given time, or until a value or an error is available. This function shall behave the same as the corresponding std::future function. ≙ std::future
Get the result. Similar to Future::get(), this call blocks until the value or an error is available. However, this call will never throw an exception. Part of the behavior taken from Future::get() is that after a call to this function the Future is not valid anymore (valid() == false).
a Result as std::move(result from the shared state) with either a value or an error that has been put into the corresponding Promise. This can be because either: • explicit setting of the Error via Promise::SetError / Promise::Set Result or • the Promise was broken, meaning the shared state was abandoned by the corresponding Promise. Then the error is kBrokenPromise as defined in [SWS_CORE_00400]
Returns nothing. This function shall behave the same as the corresponding std::future function. Part of the behavior taken from the std::future is that after a call to this function the Future is not valid anymore (valid() == false).
DOOR AI GEGENEREERDongecontroleerdModel: gemini-3.8-flash-medium · Inspanning: medium · Temperatuur: niet regelbaar · Prompt: 195e9e272b48Herkomst
vertaald uit de Duitse handleidinggemini-3.8-flash-low · 2026-10-13 · Duits origineel
De lidfunctie get van de specialisatie ara::core::Future<void, E> dient voor het wachten op het resultaat van een asynchrone bewerking zonder retourwaarde ([SWS_CORE_06226]). Deze gedraagt zich als de overeenkomstige functie van std::future en blokkeert de aanroeper totdat het resultaat of een fout beschikbaar is ([SWS_CORE_06226], [SWS_CORE_00336]). Na de aanroep verliest de Future-instantie haar geldigheid, zodat valid() == false geldt ([SWS_CORE_06226]).
De functie is als niet-uitzonderingsveilig (not exception safe) gedeclareerd ([SWS_CORE_06226]). Is in de gekoppelde Promise een fout opgeslagen, dan wordt er een overeenkomstige uitzondering gegenereerd ([SWS_CORE_06226]). Is de gedeelde toestand voortijdig opgegeven, dan treedt de foutcode kBrokenPromise conform [SWS_CORE_00400] op ([SWS_CORE_06226]). Wordt get op een reeds ongeldige instantie uitgevoerd, dan werpt de functie een FutureException op met de foutcode kNoState ([SWS_CORE_06226]).
Wat betreft de gelijktijdigheid is de methode niet thread-veilig (not thread-safe) ([SWS_CORE_06226]). Parallelle toegangen tot hetzelfde object vereisen daarom een externe synchronisatie. Bovendien neemt de functie niet deel aan de overbelastingsresolutie als C++-uitzonderingen in de compiler-toolchain zijn uitgeschakeld ([SWS_CORE_06226]).
In wisselwerking met verwante functies waarborgt [SWS_CORE_00332] (is_ready) dat get gegarandeerd niet blokkeert als de bewerking al voltooid is. Voor contexten zonder excepties biedt AUTOSAR als alternatief [SWS_CORE_00336] (GetResult), dat fouten via een resultaattype terugmeldt in plaats van excepties te werpen.
Deze tekst is gegenereerd door een AI en dient ter oriëntatie; bindend is de AUTOSAR-specificatie.
Any exception of the type associated with the error that has been put into the corresponding Promise. This can be because either: • explicit setting of the Error via: Promise::SetError(E&&) Promise::SetError(const E&) / Promise::SetResult(const Result<T, E>&) Promise::SetResult(Result <T, E>&&) • the Promise was broken, meaning the shared state was abandoned by the corresponding Promise. Then the error is kBrokenPromise as defined in [SWS_CORE_00400]. FutureException in case the Future is invalid. The contained ErrorCode is kNoState
Hinweise: This function shall not participate in overload resolution when C++ exceptions are disabled in the compiler toolchain
Request a governed re-review of this record. The record is not changed immediately.
Return whether the asynchronous operation has finished. If this function returns true, get(), Get Result() and the wait calls are guaranteed not to block.
template <typename F> auto then (F &&func) noexcept -> Future< <see below> >;
Create a new Future with the content returned by func when passed the Result of this Future. func may be called in the context of this call or in the context of Promise::set_value() or Promise::SetError() or somewhere else. valid() == false on the original future object immediately after it returns. The Callable input argument "func" takes a Result<void,E> object as parameter. This will be the Result obtained via GetResult from the Future instance itself, on which .then() is being called. The Result is passed to func as an rvalue expression. The return type of then depends on the return type of func (aka continuation). Let U be the return type of the continuation (i.e. a type equivalent to std::invoke_result_ t<std::decay_t<F>,Result<void,E>>). • If U is Future<T2,E2> for some types T2, E2, then the return type of then() is Future<T2,E2>. This is known as implicit Future unwrapping. • If U is Result<T2,E2> for some types T2, E2, then the return type of then() is Future<T2,E2>. This is known as implicit Result unwrapping. • Otherwise it is Future<U,E>. Continuations that are registered with Future::then() are registered in the Future F that Future::then() returns. No such continuation shall be executed after the destructor of the Future F returns. A continuation that is already being executed shall run to completion. Note: that means that the destructor of Future might block until the currently running continuation has been completed. The continuation shall not throw, except for the purpose of implementing a Violation. Note: Exceptions can be used within the continuation, however if they do not realize a Violation, they must not escape the continuation. Note: Users who need to propagate information from closures’ exceptions should translate them to an error and return an ara::core::Result or ara::core::Future from the continuation with the error stored in it.
DOOR AI GEGENEREERDongecontroleerdModel: gemini-3.8-flash-medium · Inspanning: medium · Temperatuur: niet regelbaar · Prompt: 161f9bad96abHerkomst
vertaald uit de Duitse handleidinggemini-3.8-flash-low · 2026-10-13 · Duits origineel
Gebruik
De methode then registreert een vervolgbewerking (continuation func) op een ara::core::Future<void, E>-instantie [SWS_CORE_06231]. Het aanroepbare object neemt het resultaat van de bewerking als rvalue-expressie van het type Result<void, E> in ontvangst, die intern via GetResult beschikbaar wordt gesteld [SWS_CORE_06231]. De aanroep van func kan synchroon in de context van then of asynchroon in de context van Promise::set_value(), Promise::SetError() dan wel elders plaatsvinden [SWS_CORE_06231].
Onmiddellijk na terugkeer uit then is de oorspronkelijke future ongeldig (valid() == false) [SWS_CORE_06231]. Het retourtype past zich aan het retourtype U van de continuation aan:
Geeft func een Future<T2, E2> terug, dan vindt impliciet uitpakken plaats en geeft thenFuture<T2, E2> terug [SWS_CORE_06231].
Geeft func een Result<T2, E2> terug, dan wordt deze eveneens impliciet uitgepakt tot Future<T2, E2>[SWS_CORE_06231].
In alle andere gevallen is het retourtype Future<U, E>[SWS_CORE_06231].
Foutafhandeling en randvoorwaarden
Gestandaardiseerde foutcodes zijn voor deze functie niet gespecificeerd [SWS_CORE_06231]. De methode is gedeclareerd als noexcept, maar definieert twee schendingen (violations):
FutureInvalidViolation: Treedt op wanneer de methode wordt aangeroepen op een ongeldige future (als valid()false teruggeeft) [SWS_CORE_06231].
FutureContinuationHasThrownViolation: Treedt op wanneer de continuation een exceptie werpt die geen violation implementeert [SWS_CORE_06231]. Fouten in de continuation moeten in plaats daarvan verpakt in een Result of Future worden teruggegeven [SWS_CORE_06231].
Gelijktijdigheid en wisselwerking
De methode is niet thread-safe (not thread-safe) [SWS_CORE_06231]. Na terugkeer uit de destructor van de geretourneerde future wordt geen geregistreerde continuation meer uitgevoerd; een reeds lopende uitvoering wordt echter voltooid, zodat de destructor kan blokkeren [SWS_CORE_06231]. Terwijl [SWS_CORE_06231] geldt voor Future<void, E>, beschrijft [SWS_CORE_00331] de variant voor getypeerde futures Future<T, E> en [SWS_CORE_06237] de overload met expliciete executor.
Deze tekst is gegenereerd door een AI op basis van de AUTOSAR-specificatie.
FutureInvalidVio- If the Future is invalid (valid returns false) lation FutureContinua- If the continuation throws an exception tionHasThrownVio- lation
template <typename F, typename ExecutorT> auto then (F &&func, ExecutorT &&executor) noexcept -> Future< <see below> >;
Create a new Future with the content returned by func when passed the Result of this Future. func is called in the context of the provided execution context executor. valid() == false on the original future object immediately after it returns. The Callable input argument "func" takes a Result<void,E> object as parameter. This will be the Result obtained via GetResult from the Future instance itself, on which .then() is being called. The Result is passed to func as an rvalue expression. The return type of then depends on the return type of func (aka continuation). Let U be the return type of the continuation (i.e. a type equivalent to std::invoke_result_ t<std::decay_t<F>,Result<void,E>>). • If U is Future<T2,E2> for some types T2, E2, then the return type of then() is Future<T2,E2>. This is known as implicit Future unwrapping. • If U is Result<T2,E2> for some types T2, E2, then the return type of then() is Future<T2,E2>. This is known as implicit Result unwrapping. • Otherwise it is Future<U,E>. Continuations that are registered with Future::then() are registered in the Future F that Future::then() returns. No such continuation shall be executed after the destructor of the Future F returns. A continuation that is already being executed shall run to completion. Note: that means that the destructor of Future might block until the currently running continuation has been completed. The continuation shall not throw, except for the purpose of implementing a Violation. Note: Exceptions can be used within the continuation, however if they do not realize a Violation, they must not escape the continuation. Note: Users who need to propagate information from closures’ exceptions should translate them to an error and return an ara::core::Result or ara::core::Future from the continuation with the error stored in it.
DOOR AI GEGENEREERDongecontroleerdModel: gemini-3.8-flash-medium · Inspanning: medium · Temperatuur: niet regelbaar · Prompt: 96d3b0e93b60Herkomst
vertaald uit de Duitse handleidinggemini-3.8-flash-low · 2026-10-13 · Duits origineel
De functie then registreert een aanroepbaar vervolgobject (continuation) func op een instantie van ara::core::Future<void, E> voor uitvoering in de opgegeven uitvoeringscontext executor[SWS_CORE_06237]. Onmiddellijk na het terugkeren van then verliest de aanroepende future-instantie haar geldigheid, zodat valid() == false is [SWS_CORE_06237]. De vervolgactie ontvangt het resultaat van de oorspronkelijke future-instantie als Result<void, E> in de vorm van een rvalue-expressie overgedragen [SWS_CORE_06237]. Als retourwaarde levert de aanroep een nieuwe Future-instantie op, waarbij retourtypen van de vervolgactie van het type Future<T2, E2> of Result<T2, E2> impliciet worden uitgepakt tot Future<T2, E2>; anders wordt een Future<U, E> geretourneerd [SWS_CORE_06237].
Met betrekking tot concurrency en levenscyclus is de functie gespecificeerd als niet thread-safe (not thread-safe) [SWS_CORE_06237]. De vervolgactie wordt geregistreerd in de nieuw geretourneerde future. Na terugkeer van de destructor van deze nieuwe future mag er geen vervolgactie meer worden uitgevoerd; een reeds in uitvoering zijnde vervolgactie loopt echter volledig ten einde, waardoor de destructor van de future kan blokkeren [SWS_CORE_06237].
De functie declareert geen gestandaardiseerde foutcodes en is gedefinieerd als noexcept[SWS_CORE_06237]. Wordt zij aangeroepen op een ongeldige future-instantie, dan is sprake van de overtreding FutureInvalidViolation[SWS_CORE_06237]. Indien de vervolgactie een exceptie genereert, leidt dit tot de overtreding FutureContinuationHasThrownViolation[SWS_CORE_06237]. Excepties mogen de vervolgactie niet verlaten, maar moeten desgewenst worden vertaald naar foutwaarden en binnen een Result of Future worden geretourneerd [SWS_CORE_06237]. De functie vult de executorloze variant [SWS_CORE_06231] aan en vormt de tegenhanger van de waardebevattende overbelastingen [SWS_CORE_00331] en [SWS_CORE_00337].
Deze gebruiksinstructie is opgesteld door een AI en is gebaseerd op de AUTOSAR-specificatie R25-11.
FutureInvalidVio- If the Future is invalid (valid returns false) lation FutureContinua- If the continuation throws an exception. tionHasThrownVio- lation
Template-Parameter
Parameter
Beschreibung
FExecutorT
the type of the func argument the type of the executor argument
Parameter (in)
Parameter
Beschreibung
func
a callable to register
executor
the execution context in which to execute the Callable func
Checks if the Future is valid, i.e. if it has a shared state.
This function shall behave the same as the corresponding std::future function.
DOOR AI GEGENEREERDongecontroleerdModel: gemini-3.8-flash-medium · Inspanning: medium · Temperatuur: niet regelbaar · Prompt: 480112e5c811Herkomst
vertaald uit de Duitse handleidinggemini-3.8-flash-low · 2026-10-13 · Duits origineel
De functie valid() controleert synchroon of de instantie van ara::core::Future<void, E> een gedeelde toestand (shared state) bezit en daarmee bruikbaar is [SWS_CORE_06227]. Zij gedraagt zich conform de specificatie analoog aan de overeenkomstige functie uit std::future[SWS_CORE_06227]. Als retourwaarde levert zij true op wanneer de future bruikbaar is, en false wanneer deze niet bruikbaar is [SWS_CORE_06227].
Wat betreft gelijktijdigheid en foutafhandeling is de methode gedeclareerd als noexcept, uitzonderingsveilig (exception safe) en uitdrukkelijk gespecificeerd als thread-safe [SWS_CORE_06227]. Zij kan zodoende veilig worden aangeroepen vanuit gelijktijdige contexten.
In samenspel met andere operaties dient valid() voor het beveiligen van de levenscyclus:
Wordt op een ongeldig future-object (valid() == false) een operatie zoals wait()[SWS_CORE_06228] of is_ready()[SWS_CORE_00332] aangeroepen, dan activeert dit de schending FutureInvalidViolation.
Consumerende operaties invalideren het object: na een aanroep van get() is de future niet meer geldig, zodat opvolgende controles met valid() de waarde false opleveren [SWS_CORE_06226].
Evenzo leiden doorgiften via then()[SWS_CORE_00331] of aanroepen van GetResult()[SWS_CORE_00336] ertoe dat het oorspronkelijke future-object onmiddellijk wordt geïnvalideerd.
Deze gebruiksinstructie is door een AI gegenereerd op basis van de specificatie.
Wait for a value or an error to be available. This function shall behave the same as the corresponding std::future function
DOOR AI GEGENEREERDongecontroleerdModel: gemini-3.8-flash-medium · Inspanning: medium · Temperatuur: niet regelbaar · Prompt: 2f9ee5ecd1d4HerkomstOpen vragen (1)
vertaald uit de Duitse handleidinggemini-3.8-flash-low · 2026-10-13 · Duits origineel
De memberfunctie wait van de specialisatie ara::core::Future<void, E> blokkeert de aanroepende thread synchroon totdat het resultaat van de asynchrone bewerking in de vorm van een waarde of een fout beschikbaar is [SWS_CORE_06228]. De functie accepteert geen parameters, levert geen retourwaarde op (void) en gedraagt zich conform de specificatie zoals de overeenkomstige functie van std::future[SWS_CORE_06228].
Met betrekking tot foutafhandeling en randvoorwaarden gelden de volgende voorschriften:
Exceptieveiligheid en foutafhandeling: De bewerking is gedeclareerd met noexcept en gespecificeerd als exceptieveilig (exception safe) [SWS_CORE_06228]. Levert valid() voor de future-instantie false op, dan is er sprake van de schending FutureInvalidViolation[SWS_CORE_06228]. Het concrete gevolg van deze schending is vermoedelijk gerealiseerd als systeemspecifieke foutafhandeling van de AUTOSAR-runtime-omgeving. Vraag Q-469e9abc947b9869 (open)
Concurrentie: De functie is geclassificeerd als niet-thread-safe (not thread-safe) [SWS_CORE_06228]. Gelijktijdige toegang tot hetzelfde future-object zonder externe synchronisatie is daarom niet toegestaan.
In wisselwerking met de overige functies van de module core bestaan de volgende mogelijkheden:
Met de thread-safe methode is_ready kan vooraf worden opgevraagd of de bewerking is voltooid; bij teruggave van true blokkeert wait gegarandeerd niet meer [SWS_CORE_06232].
Om oneindig blokkeren te voorkomen, staan de tijdgebonden functies wait_for met een relatieve tijdsduur [SWS_CORE_06229] evenals wait_until met een absoluut tijdstip [SWS_CORE_06230] ter beschikking.
Voor de primaire templateklasse ara::core::Future gelden dezelfde synchrone wachtvoorschriften en beperkingen [SWS_CORE_00328].
Deze tekst is gecureerd door een AI-systeem en steunt uitsluitend op de AUTOSAR-specificatie.
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
DOOR AI GEGENEREERDongecontroleerdModel: gemini-3.8-flash-medium · Inspanning: medium · Temperatuur: niet regelbaar · Prompt: 927a98d78cf3HerkomstOpen vragen (1)
vertaald uit de Duitse handleidinggemini-3.8-flash-low · 2026-10-13 · Duits origineel
De methode wait_for van de specialisatie ara::core::Future<void, E> blokkeert de aanroepende thread synchroon gedurende een maximale tijdsduur timeoutDuration of totdat het resultaat beschikbaar is [SWS_CORE_06229]. Zij gedraagt zich semantisch zoals de corresponderende standaardfunctie std::future::wait_for[SWS_CORE_06229].
Als retourwaarde levert de functie de status FutureStatus[SWS_CORE_06229]. Deze signaleert met FutureStatus::kReady dat een waarde of een fout beschikbaar is, respectievelijk met FutureStatus::kTimeout dat de termijn zonder resultaat is verstreken [SWS_CORE_00361]. Een aan std::future_status::deferred equivalente toestand is niet voorzien [SWS_CORE_00361]. Het gedrag komt overeen met de algemene Future-interface [SWS_CORE_00329].
Voor de aanroep gelden de volgende voorwaarden met betrekking tot concurrency en foutafhandeling:
Concurrency: De functie is gespecificeerd als niet thread-safe (not thread-safe) [SWS_CORE_06229]. Gelijktijdige aanroepen op dezelfde instantie moeten aan de zijde van de aanroeper worden beveiligd.
Foutgevallen en exception safety: De bewerking is gedeclareerd als exceptieveilig (exception safe) alsmede noexcept[SWS_CORE_06229]. Als het Future-object ongeldig is (valid() levert false op), is er sprake van een FutureInvalidViolation[SWS_CORE_06229]. Vanwege de noexcept-declaratie zou deze overtreding vermoedelijk leiden tot een onmiddellijke programma-afbreking. Vraag Q-4f01aa6e7fbfb12d (open)
Deze gebruiksinstructie is geautomatiseerd opgesteld op basis van de specificatie van AUTOSAR Adaptive R25-11.
Wait until the given time, or until a value or an error is available. This function shall behave the same as the corresponding std::future function.
DOOR AI GEGENEREERDongecontroleerdModel: gemini-3.8-flash-medium · Inspanning: medium · Temperatuur: niet regelbaar · Prompt: 932b0d674f17Herkomst
vertaald uit de Duitse handleidinggemini-3.8-flash-low · 2026-10-13 · Duits origineel
De lidfunctie wait_until van de specialisatie ara::core::Future<void, E> blokkeert de aanroepende thread totdat het opgegeven absolute tijdstip deadline is bereikt of een waarde respectievelijk een fout beschikbaar is [SWS_CORE_06230]. De functie vertoont hetzelfde gedrag als de corresponderende C++-standaardfunctie std::future::wait_until[SWS_CORE_06230] en bezit dezelfde semantiek als de generieke overbelasting voor ara::core::Future[SWS_CORE_00330].
De retourwaarde van het type FutureStatus signaleert of de termijn is bereikt of dat er een waarde beschikbaar is [SWS_CORE_06230]. Hierbij geeft de toestand kReady aan dat de gedeelde status gereed is, terwijl kTimeout betekent dat de gedeelde status vóór het verstrijken van de termijn niet gereed was [SWS_CORE_00361]. Een toestand analoog aan std::future_status::deferred bestaat niet in FutureStatus[SWS_CORE_00361].
Met betrekking tot uitvoering en randvoorwaarden zijn de volgende specificaties gedefinieerd:
Aanroepcontext en uitzonderingsgedrag: De functie is beschikbaar via het headerbestand #include "ara/core/future.h", gedeclareerd als noexcept en gespecificeerd als exceptieveilig (exception safe) [SWS_CORE_06230].
Fouttoestanden: Als de future ongeldig is, dus wanneer valid() de waarde false retourneert, is sprake van de overtreding FutureInvalidViolation[SWS_CORE_06230].
Concurrency: De bewerking is geclassificeerd als niet thread-safe (not thread-safe) [SWS_CORE_06230].
Deze gebruiksinstructie is automatisch gegenereerd op basis van de specificatie van AUTOSAR Adaptive R25-11.
gemini-3.8-flash-low· 2026-10-13 · Duits origineel