DEENESPTFRRUARHIKOZHNL

класс 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

Руководство пользователяСОЗДАНО ИИ

Позволяет ожидать завершения асинхронной операции без возвращаемого значения, а также извлекать статус ошибки.
СОЗДАНО ИИ не проверено Модель: gemini-3.8-flash-medium · Усилие: medium · Температура: не регулируется · Промпт: e943c154e07e Происхождение
переведено с немецкого руководстваgemini-3.8-flash-low · 2026-10-13 · Немецкий оригинал

Позволяет ожидать завершения асинхронной операции без возвращаемого значения, а также извлекать статус ошибки.

Класс ara::core::Future<void, E> обеспечивает асинхронную синхронизацию и проверку ошибок для операций без возвращаемого значения в AUTOSAR Adaptive [SWS_CORE_06236]. Будучи некопируемым типом, он позволяет ожидать завершения, а также безопасно с точки зрения исключений получать результат в виде ara::core::Result<void, E> [SWS_CORE_06236] или выполнять асинхронную дальнейшую обработку с помощью функции продолжения [SWS_CORE_06231]. После извлечения результата разделяемое состояние инвалидируется, поэтому последующие вызовы без действительного состояния представляют собой нарушение [SWS_CORE_06236].

Контекст

Специализация шаблонного класса ara::core::Future<void, E> представляет собой принимающую сторону асинхронной операции в AUTOSAR Adaptive, которая при успешном завершении не возвращает значение, а лишь сигнализирует о наступлении события или возникшей ошибке. Согласно описанию класса, реализация должна завершать условие E != ara::core::ErrorCode ошибкой компиляции. Класс обычно взаимодействует с соответствующим ara::core::Promise, заполняющим разделяемое состояние (shared state) [SWS_CORE_06236], а также с асинхронными контекстами выполнения при регистрации функций продолжения [SWS_CORE_06237].

Жизненный цикл

Экземпляры ara::core::Future<void, E> являются объектами исключительно с семантикой перемещения: конструктор копирования [SWS_CORE_06234] и оператор присваивания с копированием [SWS_CORE_06235] удалены (delete). Объект, созданный через конструктор по умолчанию, не имеет разделяемого состояния и ведет себя аналогично std::future [SWS_CORE_06222]. С помощью конструктора перемещения [SWS_CORE_06223] или оператора присваивания с перемещением [SWS_CORE_06225] экземпляр принимает владение shared state от другого экземпляра.

Жизненный цикл в значительной степени определяется состоянием shared state. С помощью метода valid() можно проверить, привязан ли экземпляр к shared state и пригоден ли он тем самым к использованию [SWS_CORE_06227]. Как только результат извлекается с помощью GetResult() [SWS_CORE_06236] или get() [SWS_CORE_06226] либо регистрируется продолжение через then() [SWS_CORE_06231], объект Future теряет свое shared state и valid() возвращает false. Деструктор освобождает оставшееся разделяемое состояние [SWS_CORE_06233]. С точки зрения конкурентности операции проверки и уничтожения, такие как valid() [SWS_CORE_06227], is_ready() [SWS_CORE_06232] и деструктор [SWS_CORE_06233], потокобезопасны, тогда как изменяющие состояние операции, такие как GetResult() [SWS_CORE_06236], get() [SWS_CORE_06226] и функции ожидания [SWS_CORE_06228], не являются потокобезопасными.

future_states Ungueltig Недействительно (valid() == false) Ausstehend Действительно / ожидается (valid() == true, is_ready() == false) Ungueltig->Ausstehend Move-Konstruktion / Zuweisung Ausstehend->Ungueltig then() Bereit Действительно / готово (valid() == true, is_ready() == true) Ausstehend->Bereit Promise setzt Wert / Fehler Bereit->Ungueltig GetResult() / get() Bereit->Ungueltig then()

Диаграмма состояний: переходы состояний и валидность ara::core::Future<void, E>. Источники: [SWS_CORE_06222], [SWS_CORE_06226], [SWS_CORE_06227], [SWS_CORE_06231], [SWS_CORE_06232], [SWS_CORE_06233], [SWS_CORE_06236]

Путь использования

В синхронном пути использования потребитель ожидает завершения асинхронной операции. С помощью is_ready() можно с минимальными блокировками запросить наличие значения или ошибки [SWS_CORE_06232]. В качестве альтернативы можно ожидать блокирующим образом с помощью wait() [SWS_CORE_06228] или с ограничением по времени через wait_for() [SWS_CORE_06229] и wait_until() [SWS_CORE_06230]. Если результат доступен, опрос значения предпочтительно выполняется безопасным по отношению к исключениям способом через GetResult(), благодаря чему возвращается ara::core::Result<void, E> [SWS_CORE_06236].

В асинхронном пути метод then() позволяет зарегистрировать функцию продолжения (continuation), которая выполняется, как только результат становится доступен [SWS_CORE_06231]. При этом опционально может быть передан контекст выполнения (executor) [SWS_CORE_06237]. Функция продолжения принимает Result<void, E> как rvalue. Возвращаемый тип then() автоматически распаковывает вложенные типы Future или Result (unwrapping) [SWS_CORE_06231].

Синхронное получение результата через GetResultПриложениеFutureSharedStatevalid()trueis_ready()Проверить статусtrue (результат или ошибка готовы)trueGetResult()std::move(Ergebnis)Result<void, E>Сделать разделяемое состояние недействительным (valid() == false)Result<void, E>

Диаграмма последовательности: синхронный процесс запроса результата через GetResult. Источники: [SWS_CORE_06227], [SWS_CORE_06228], [SWS_CORE_06232], [SWS_CORE_06236]

Сценарии ошибок

Если зависящая от состояния операция (такая как GetResult(), is_ready(), wait(), wait_for(), wait_until() или then()) вызывается на недействительном экземпляре (valid() == false), возникает нарушение предусловия, которое обрабатывается как FutureInvalidViolation [SWS_CORE_06228], [SWS_CORE_06229], [SWS_CORE_06230], [SWS_CORE_06231], [SWS_CORE_06232], [SWS_CORE_06236], [SWS_CORE_06237]. При вызове get() на недействительном экземпляре вместо этого инициируется FutureException с кодом ошибки kNoState [SWS_CORE_06226]; при отключенных исключениях C++ get() не участвует в разрешении перегрузок [SWS_CORE_06226].

Если соответствующий promise был уничтожен или покинул разделяемое состояние без установки результата или явной ошибки, код ошибки FutureErrc::kBrokenPromise согласно [SWS_CORE_00400] сохраняется в shared state [SWS_CORE_06226], [SWS_CORE_06236]. Он возвращается методом GetResult() как ошибка в Result<void, E> [SWS_CORE_06236]. Если continuation, зарегистрированная в then(), генерирует исключение, не реализующее нарушение, это приводит к FutureContinuationHasThrownViolation [SWS_CORE_06231], [SWS_CORE_06237].

Данное руководство основано исключительно на спецификации AUTOSAR для ara::core::Future<void, E> в релизе R25-11.

Карта членов

Конструкторы и деструктор

2

Операторы

1

Диаграмма классов

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

Подробный вид

Выберите элемент в оглавлении.

Конструкторы и деструктор

Future функция 3

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

Перегрузки Future 3
Future () noexcept; SWS_CORE_06222
Future (Future &&other) noexcept; SWS_CORE_06223
Future (const Future &other)=delete; SWS_CORE_06234
~Future функция

Destructor for Future objects. Abandons any shared state

~Future () noexcept;

Методы

get функция

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 функция

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 функция

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 функция 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_

Перегрузки 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 функция

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

bool valid () const noexcept;
wait функция

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 функция

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 функция

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;

Операторы

operator= функция 2

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

Перегрузки = 2
Future & operator= (Future &&other) noexcept; SWS_CORE_06225
Future & operator= (const Future &other)=delete; SWS_CORE_06235

Документация методов

функция 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#4ce86c2b
Content hash
4ce86c2b
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

функция 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#bfbd6f75
Content hash
bfbd6f75
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

функция 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#2ca2799e
Content hash
2ca2799e
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

функция 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#832568ea
Content hash
832568ea
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

функция 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).

СОЗДАНО ИИ не проверено Модель: gemini-3.8-flash-medium · Усилие: medium · Температура: не регулируется · Промпт: 195e9e272b48 Происхождение
переведено с немецкого руководстваgemini-3.8-flash-low · 2026-10-13 · Немецкий оригинал

Функция-член get специализации ara::core::Future<void, E> служит для ожидания результата асинхронной операции без возвращаемого значения ([SWS_CORE_06226]). Она ведет себя как соответствующая функция std::future и блокирует вызывающую сторону до тех пор, пока не будет готов результат или ошибка ([SWS_CORE_06226], [SWS_CORE_00336]). После вызова экземпляр Future теряет валидность, так что выполняется valid() == false ([SWS_CORE_06226]).

Функция объявлена небезопасной относительно исключений (not exception safe) ([SWS_CORE_06226]). Если в связанном Promise была сохранена ошибка, инициируется соответствующее исключение ([SWS_CORE_06226]). Если общее состояние было преждевременно прекращено, возникает код ошибки kBrokenPromise согласно [SWS_CORE_00400] ([SWS_CORE_06226]). Если get выполняется на уже невалидном экземпляре, функция генерирует FutureException с кодом ошибки kNoState ([SWS_CORE_06226]).

Что касается параллелизма, метод не является потокобезопасным (not thread-safe) ([SWS_CORE_06226]). Поэтому параллельные обращения к одному и тому же объекту требуют внешней синхронизации. Кроме того, функция не участвует в разрешении перегрузки, если исключения C++ отключены в инструментарии компилятора ([SWS_CORE_06226]).

Во взаимодействии с родственными функциями [SWS_CORE_00332] (is_ready) гарантирует, что get заведомо не заблокирует выполнение, если операция уже завершена. Для контекстов без исключений AUTOSAR предлагает в качестве альтернативы [SWS_CORE_00336] (GetResult), который возвращает ошибки через тип результата вместо генерации исключений.

Этот текст был сгенерирован ИИ и служит в качестве ориентира; обязательную силу имеет спецификация AUTOSAR.

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#55d62255
Content hash
55d62255
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

функция 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#253411a0
Content hash
253411a0
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

функция 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#0226b1cc
Content hash
0226b1cc
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

функция 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#c3cac08c
Content hash
c3cac08c
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

функция 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.

СОЗДАНО ИИ не проверено Модель: gemini-3.8-flash-medium · Усилие: medium · Температура: не регулируется · Промпт: 161f9bad96ab Происхождение
переведено с немецкого руководстваgemini-3.8-flash-low · 2026-10-13 · Немецкий оригинал

Использование

Метод then регистрирует операцию продолжения (continuation func) для экземпляра ara::core::Future<void, E> [SWS_CORE_06231]. Вызываемый объект принимает результат операции в виде rvalue-выражения типа Result<void, E>, которое внутренне предоставляется через GetResult [SWS_CORE_06231]. Вызов func может происходить синхронно в контексте then или асинхронно в контексте Promise::set_value(), Promise::SetError() либо в другом месте [SWS_CORE_06231].

Непосредственно после возврата из then исходный Future становится невалидным (valid() == false) [SWS_CORE_06231]. Тип возвращаемого значения адаптируется к типу возвращаемого значения U функции продолжения:

  • Если func возвращает Future<T2, E2>, выполняется неявная распаковка и then возвращает Future<T2, E2> [SWS_CORE_06231].
  • Если func возвращает Result<T2, E2>, оно также неявно распаковывается в Future<T2, E2> [SWS_CORE_06231].
  • Во всех остальных случаях возвращаемым типом является Future<U, E> [SWS_CORE_06231].

Обработка ошибок и граничные условия

Стандартизированные коды ошибок для этой функции не специфицированы [SWS_CORE_06231]. Метод объявлен как noexcept, однако определяет два нарушения (violations):

  • FutureInvalidViolation: возникает при вызове метода на невалидном Future (если valid() возвращает false) [SWS_CORE_06231].
  • FutureContinuationHasThrownViolation: возникает, если продолжение генерирует исключение, не реализующее Violation [SWS_CORE_06231]. Ошибки в продолжении должны вместо этого возвращаться упакованными в Result или Future [SWS_CORE_06231].

Параллелизм и взаимодействие

Метод не является потокобезопасным (not thread-safe) [SWS_CORE_06231]. После возврата из деструктора возвращенного Future ни одно зарегистрированное продолжение больше не выполняется; однако уже запущенное выполнение доводится до конца, поэтому деструктор может блокировать выполнение [SWS_CORE_06231]. В то время как [SWS_CORE_06231] относится к Future<void, E>, [SWS_CORE_00331] описывает вариант для типизированных Future Future<T, E>, а [SWS_CORE_06237] — перегрузку с явным исполнителем (Executor).

Этот текст был сгенерирован ИИ на основе спецификации 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#65679da0
Content hash
65679da0
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

функция 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.

СОЗДАНО ИИ не проверено Модель: gemini-3.8-flash-medium · Усилие: medium · Температура: не регулируется · Промпт: 96d3b0e93b60 Происхождение
переведено с немецкого руководстваgemini-3.8-flash-low · 2026-10-13 · Немецкий оригинал

Функция then регистрирует вызываемый объект продолжения (continuation) func на экземпляре ara::core::Future<void, E> для выполнения в указанном контексте выполнения executor [SWS_CORE_06237]. Непосредственно после возврата из then вызывающий экземпляр Future теряет свою валидность, так что выполняется valid() == false [SWS_CORE_06237]. Продолжение получает результат исходного экземпляра Future в виде Result<void, E> в форме rvalue-выражения [SWS_CORE_06237]. В качестве возвращаемого значения вызов возвращает новый экземпляр Future, причем типы возвращаемого значения продолжения типа Future<T2, E2> или Result<T2, E2> неявно распаковываются в Future<T2, E2>; в противном случае возвращается Future<U, E> [SWS_CORE_06237].

В отношении параллелизма и жизненного цикла функция специфицирована как непотокобезопасная (not thread-safe) [SWS_CORE_06237]. Продолжение регистрируется во вновь возвращенном объекте Future. После возврата деструктора этого нового Future ни одно продолжение больше не должно выполняться; однако уже выполняющееся продолжение завершается полностью, из-за чего деструктор Future может блокироваться [SWS_CORE_06237].

Функция не объявляет стандартизированных кодов ошибок и определена как noexcept [SWS_CORE_06237]. Если она вызывается на недействительном экземпляре Future, возникает нарушение FutureInvalidViolation [SWS_CORE_06237]. Если продолжение генерирует исключение, это приводит к нарушению FutureContinuationHasThrownViolation [SWS_CORE_06237]. Исключения не должны покидать продолжение, а должны при необходимости преобразовываться в значения ошибок и возвращаться внутри Result или Future [SWS_CORE_06237]. Функция дополняет вариант без исполнителя [SWS_CORE_06231] и является аналогом перегрузок со значениями [SWS_CORE_00331], а также [SWS_CORE_00337].

Данное указание по использованию было создано ИИ и основано на спецификации 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#1ccf1f7c
Content hash
1ccf1f7c
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

функция 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.

СОЗДАНО ИИ не проверено Модель: gemini-3.8-flash-medium · Усилие: medium · Температура: не регулируется · Промпт: 480112e5c811 Происхождение
переведено с немецкого руководстваgemini-3.8-flash-low · 2026-10-13 · Немецкий оригинал

Функция valid() синхронно проверяет, имеет ли экземпляр ara::core::Future<void, E> общее состояние (Shared State) и пригоден ли он тем самым к использованию [SWS_CORE_06227]. Согласно спецификации она ведёт себя аналогично соответствующей функции из std::future [SWS_CORE_06227]. В качестве возвращаемого значения она возвращает true, если Future пригоден для использования, и false, если он непригоден [SWS_CORE_06227].

Что касается параллелизма и обработки ошибок, метод объявлен как noexcept, является исключебно-безопасным (exception safe) и явно специфицирован как потокобезопасный (thread-safe) [SWS_CORE_06227]. Таким образом, его можно безопасно вызывать из параллельных контекстов.

Во взаимодействии с другими операциями valid() служит для контроля жизненного цикла:

  • Если для недействительного объекта Future (valid() == false) вызывается такая операция, как wait() [SWS_CORE_06228] или is_ready() [SWS_CORE_00332], это приводит к нарушению FutureInvalidViolation.
  • Потребляющие операции инвалидируют объект: после вызова get() Future больше не является действительным, так что последующие проверки с помощью valid() возвращают значение false [SWS_CORE_06226].
  • Аналогично, перемещение через then() [SWS_CORE_00331] или вызовы GetResult() [SWS_CORE_00336] приводят к немедленной инвалидации исходного объекта Future.

Данное указание по использованию было сгенерировано ИИ на основе спецификации.

Руководство разработчика реализации в подготовке (сложность 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#bd3f44f9
Content hash
bd3f44f9
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

функция 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

СОЗДАНО ИИ не проверено Модель: gemini-3.8-flash-medium · Усилие: medium · Температура: не регулируется · Промпт: 2f9ee5ecd1d4 Происхождение Открытые вопросы (1)
переведено с немецкого руководстваgemini-3.8-flash-low · 2026-10-13 · Немецкий оригинал

Функция-член wait специализации ara::core::Future<void, E> синхронно блокирует вызывающий поток до тех пор, пока результат асинхронной операции не станет доступен в виде значения или ошибки [SWS_CORE_06228]. Функция не принимает параметров, не возвращает значения (void) и в соответствии со спецификацией ведет себя как соответствующая функция std::future [SWS_CORE_06228].

В отношении обработки ошибок и граничных условий действуют следующие требования:

  • Безопасность исключений и обработка ошибок: операция объявлена с noexcept и специфицирована как безопасная относительно исключений (exception safe) [SWS_CORE_06228]. Если valid() возвращает false для экземпляра Future, имеет место нарушение FutureInvalidViolation [SWS_CORE_06228]. Конкретное следствие этого нарушения, вероятно, реализовано как платформозависимая обработка ошибок среды выполнения AUTOSAR. Вопрос Q-469e9abc947b9869 (открытый)
  • Параллелизм: функция классифицирована как непотокобезопасная (not thread-safe) [SWS_CORE_06228]. Поэтому параллельный доступ к одному и тому же объекту Future без внешней синхронизации недопустим.

Во взаимодействии с другими функциями модуля core существуют следующие возможности:

  • С помощью потокобезопасного метода is_ready можно заранее запросить, завершена ли операция; при возврате true метод wait гарантированно больше не блокирует выполнение [SWS_CORE_06232].
  • Для предотвращения бесконечной блокировки доступны функции с ограничением по времени wait_for с относительной длительностью [SWS_CORE_06229], а также wait_until с абсолютной временной меткой [SWS_CORE_06230].
  • Для первичного шаблонного класса ara::core::Future действуют те же правила синхронного ожидания и ограничения [SWS_CORE_00328].

Этот текст курирован системой ИИ и опирается исключительно на спецификацию 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#b16f3f0f
Content hash
b16f3f0f
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

функция 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

СОЗДАНО ИИ не проверено Модель: gemini-3.8-flash-medium · Усилие: medium · Температура: не регулируется · Промпт: 927a98d78cf3 Происхождение Открытые вопросы (1)
переведено с немецкого руководстваgemini-3.8-flash-low · 2026-10-13 · Немецкий оригинал

Метод wait_for специализации ara::core::Future<void, E> синхронно блокирует вызывающий поток на максимальный промежуток времени timeoutDuration или до тех пор, пока результат не станет готов [SWS_CORE_06229]. Семантически он ведет себя аналогично соответствующей стандартной функции std::future::wait_for [SWS_CORE_06229].

В качестве возвращаемого значения функция возвращает статус FutureStatus [SWS_CORE_06229]. Он сигнализирует с помощью FutureStatus::kReady, что значение или ошибка доступны, либо с помощью FutureStatus::kTimeout, что срок истек без получения результата [SWS_CORE_00361]. Состояние, эквивалентное std::future_status::deferred, не предусмотрено [SWS_CORE_00361]. Поведение соответствует общему интерфейсу Future [SWS_CORE_00329].

Для вызова действуют следующие условия относительно параллелизма и обработки ошибок:

  • Параллелизм: функция специфицирована как непотокобезопасная (not thread-safe) [SWS_CORE_06229]. Одновременные вызовы на одном и том же экземпляре должны быть защищены на стороне вызывающего кода.
  • Случаи ошибок и безопасность исключений: операция объявлена как безопасная относительно исключений (exception safe), а также noexcept [SWS_CORE_06229]. Если объект Future недействителен (valid() возвращает false), имеет место FutureInvalidViolation [SWS_CORE_06229]. Из-за объявления noexcept это нарушение, вероятно, приведет к немедленному аварийному завершению программы. Вопрос Q-4f01aa6e7fbfb12d (открытый)

Данное указание по использованию было создано автоматически на основе спецификации AUTOSAR Adaptive R25-11.

Руководство разработчика реализации в подготовке (сложность 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#1649d79f
Content hash
1649d79f
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

функция 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.

СОЗДАНО ИИ не проверено Модель: gemini-3.8-flash-medium · Усилие: medium · Температура: не регулируется · Промпт: 932b0d674f17 Происхождение
переведено с немецкого руководстваgemini-3.8-flash-low · 2026-10-13 · Немецкий оригинал

Функция-член wait_until специализации ara::core::Future<void, E> блокирует вызывающий поток до тех пор, пока не будет достигнут указанный абсолютный момент времени deadline или пока не станет доступно значение либо ошибка [SWS_CORE_06230]. Функция демонстрирует такое же поведение, как и соответствующая стандартная функция C++ std::future::wait_until [SWS_CORE_06230], и обладает той же семантикой, что и универсальная перегрузка для ara::core::Future [SWS_CORE_00330].

Возвращаемое значение типа FutureStatus сигнализирует, истек ли предельный срок или стало доступно значение [SWS_CORE_06230]. При этом состояние kReady указывает на то, что разделяемое состояние готово, тогда как kTimeout означает, что разделяемое состояние не стало готовым до истечения предельного срока [SWS_CORE_00361]. Состояние, аналогичное std::future_status::deferred, в FutureStatus отсутствует [SWS_CORE_00361].

В отношении выполнения и граничных условий определены следующие требования:

  • Контекст вызова и поведение при исключениях: функция доступна через заголовочный файл #include "ara/core/future.h", объявлена как noexcept и специфицирована как безопасная относительно исключений (exception safe) [SWS_CORE_06230].
  • Состояния ошибок: если Future недействителен, то есть когда valid() возвращает значение false, имеет место нарушение FutureInvalidViolation [SWS_CORE_06230].
  • Параллелизм: операция классифицируется как непотокобезопасная (not thread-safe) [SWS_CORE_06230].

Данное указание по использованию было сгенерировано автоматически на основе спецификации AUTOSAR Adaptive R25-11.

Руководство разработчика реализации в подготовке (сложность 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#2334ee74
Content hash
2334ee74
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

функция ~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#ee90ab0c
Content hash
ee90ab0c
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