DEENESPTFRRUARHIKOZHNL

类 ara::core::Promise

[SWS_CORE_00340] Upstream: RS_AP_00130

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

ara::core specific variant of std::promise class 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

用户指南人工智能生成

提供一个异步通道,以便跨线程将值或错误传递给关联的 Future。
AI 生成 未审核 模型: gemini-3.8-flash-medium · 推理强度: medium · 温度: 不可控 · 提示词: 5c323bf911df 来源 未决问题(1)
译自德文指南gemini-3.8-flash-low · 2026-10-13 · 德文原文

提供一个异步通道,以便跨线程将值或错误传递给关联的 Future。

类 ara::core::Promise 充当异步写入端点,以便跨线程将值、错误或结果传输到共享状态中 [SWS_CORE_00341]。读取访问通过仅可获取一次的 Future 进行,该对象在提供结果时被释放 [SWS_CORE_00344]。由于该类不可复制,状态通过移动语义严格保留在唯一所有权中,多次设置结果或多次获取 Future 会导致标准化违规。

上下文

类 ara::core::Promise 代表 C++ 标准中已知概念 std::promise 的 Adaptive Platform 特定体现。它在头文件 ara/core/future.h 中被定义为模板 Promise<T, E = ErrorCode>,并充当共享状态(shared state)的异步写入端点。生产者通过该通道跨线程传递计算出的输出值、错误或聚合的 ara::core::Result。关联的接收端通过关联的 ara::core::Future 访问结果,该结果通过实例方法 get_future 获取 [SWS_CORE_00344]。与主要基于异常的标准 C++ 机制不同,AUTOSAR Adaptive 确立了错误定型范式:只要错误类型 E 选择不等于 ara::core::ErrorCode,规范就会强制要求编译错误。

生命周期

实例通常通过无参默认构造函数创建,该构造函数的行为类似于 std::promise 的对应构造函数,是线程安全的,并建立新的共享状态 [SWS_CORE_00341]。为了保证对该状态的明确所有权关系,完全禁止复制操作:复制构造函数 [SWS_CORE_00350] 与复制赋值运算符 [SWS_CORE_00351] 均被声明为已删除(delete)。

然而,该类支持移动语义(Move)。移动构造函数接管源实例的共享状态 [SWS_CORE_00342]。在移动赋值中,目标实例放弃其原有的共享状态,并接管传入对象的状态,类似于交换操作 [SWS_CORE_00343]。此外,方法 swap 允许与另一个实例交换内部状态 [SWS_CORE_00352]。在通过析构函数销毁时,仍持有的共享状态会被释放或脱离 [SWS_CORE_00349]。默认构造函数被设计为线程安全的 [SWS_CORE_00341],而移动操作、赋值、交换(Swap)和销毁则不是线程安全的([SWS_CORE_00342]、[SWS_CORE_00343]、[SWS_CORE_00352]、[SWS_CORE_00349])。

PromiseStates Init Created SharedStateInitialisiert Init->Created Promise() FutureRetrieved FutureAbgerufen Created->FutureRetrieved get_future() Ready SharedStateReady Created->Ready set_value() / SetError() / SetResult() NoState KeinSharedState Created->NoState Move / operator= Destroyed Beendet Created->Destroyed ~Promise() FutureRetrieved->Ready set_value() / SetError() / SetResult() FutureRetrieved->NoState Move / operator= FutureRetrieved->Destroyed ~Promise() Ready->NoState Move / operator= Ready->Destroyed ~Promise() NoState->Destroyed ~Promise()

状态图:Promise 实例中共享状态的生命周期和状态转换。来源:[SWS_CORE_00341]、[SWS_CORE_00342]、[SWS_CORE_00343]、[SWS_CORE_00344]、[SWS_CORE_00345]、[SWS_CORE_00349]、[SWS_CORE_00353]、[SWS_CORE_00355]

使用路径

典型的提供流程包括以下步骤:

  1. 创建:生产者实例化一个 ara::core::Promise<T, E> [SWS_CORE_00341]。
  2. 获取 Future:在开始异步处理之前,生产者调用 get_future() [SWS_CORE_00344]。由于每个 Promise 仅允许关联一个 Future,因此该调用必须仅执行一次。返回的 Future 将传递给消费者线程。
  3. 设置结果:异步操作完成后,生产者将结果转移到共享状态中,并将其置为 ready 状态。为此分别提供了用于复制和移动操作的线程安全重载:
通过 Promise 和 Future 进行异步提供ErzeugerPromiseSharedStateFutureVerbraucherPromise()Erzeuge Shared Stateget_future()创建带有共享状态的 Future传递 FuturealtErfolgsfall: Wert bereitstellenset_value(value)Speichere Wert, setze Zustand readyFehlerfall: Fehler meldenSetError(error)Speichere Error, setze Zustand readyResult-Fall: Resultat setzenSetResult(result)Speichere Result, setze Zustand readyErgebnis abfragenLese Zustand

时序图:生产者、Promise、Shared State 和消费者之间的调用与同步序列。来源:[SWS_CORE_00341]、[SWS_CORE_00344]、[SWS_CORE_00345]、[SWS_CORE_00353]、[SWS_CORE_00355]

错误场景

该规范为与共享状态的所有交互定义了严格的前置条件,不遵守这些前置条件将导致标准化的违规(Violations):

  • 多次获取 Future:如果针对同一共享状态多次调用 get_future(),则会发生违规 IsoStdFutureErrcFutureAlreadyRetrievedViolation [SWS_CORE_00344]。
  • 缺少 Shared State:如果被调用的实例不具有共享状态——例如在执行移动操作之后——get_future() 会导致 IsoStdFutureErrcNoStateViolation [SWS_CORE_00344]。在这种情况下,方法 set_value、SetError 和 SetResult 会触发违规 PromiseNoSharedStateToSetViolation([SWS_CORE_00345]、[SWS_CORE_00353]、[SWS_CORE_00355])。
  • 状态已满足:如果共享状态已被赋予值、错误或结果,则每次重新调用 set_value([SWS_CORE_00345]、[SWS_CORE_00346])、SetError([SWS_CORE_00353]、[SWS_CORE_00354])或 SetResult([SWS_CORE_00355]、[SWS_CORE_00356])都会导致违规 IsoStdFutureErrcPromiseAlreadySatisfiedViolation。
  • 异常安全性:方法 set_value、SetError 和 SetResult 具备有条件异常安全性(conditionally exception safe)。只要类型 T 和 E 的构造函数声明为 nothrow,它们就不会抛出异常([SWS_CORE_00345]、[SWS_CORE_00353]、[SWS_CORE_00355])。

Interpretation:在销毁实例且事先未赋值的情况下放弃共享状态([SWS_CORE_00349]),可能类似于 std::promise 的 C++ 标准行为,导致关联的 Future 在尝试读取时记录相应的错误事件。 问题 Q-fd013bb17a591af9 (未决)

本指南仅基于 AUTOSAR Adaptive(Release R25-11)的规范要求。

成员图

构造函数和析构函数

2

运算符

1

类图

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

G nara__core__Promise131 Promise + Promise() + operator=() + ~Promise() + SetError() + SetResult() + get_future() + set_value() + swap()

详细视图

请在大纲中选择一个条目。

构造函数和析构函数

Promise 函数 3

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

重载 Promise 3
Promise () noexcept; SWS_CORE_00341
Promise (Promise &&other) noexcept; SWS_CORE_00342
Promise (const Promise &)=delete; SWS_CORE_00350
~Promise 函数

Destructor for Promise objects Abandons any shared state.

~Promise () noexcept;

方法

get_future 函数

Return an associated Future with the same shared state as *this The returned Future is set as soon as this Promise receives the result, value, or an error. This fuction must only be called once as it is not allowed to have multiple Futures per Promise.

Future< T, E > get_future () noexcept;
set_value 函数 2

Copy a value into the shared state and make the shared state ready.

重载 set_value 2
void set_value (const T &value) noexcept(std::is_nothrow_copy_ constructible< T >::value); SWS_CORE_00345
void set_value (T &&value) noexcept(std::is_nothrow_move_ constructible< T >::value); SWS_CORE_00346
SetError 函数 2

Move an error into the shared state and make the shared state ready.

重载 SetError 2
void SetError (E &&error) noexcept(std::is_nothrow_move_constructible< E >::value); SWS_CORE_00353
void SetError (const E &error) noexcept(std::is_nothrow_copy_ constructible< E >::value); SWS_CORE_00354
SetResult 函数 2

Copy a Result into the shared state and make the shared state ready.

重载 SetResult 2
void SetResult (const Result< T, E > &result) noexcept(std::is_ nothrow_copy_constructible< T >::value &&std::is_nothrow_copy_ constructible< E >::value); SWS_CORE_00355
void SetResult (Result< T, E > &&result) noexcept(std::is_nothrow_ move_constructible< T >::value &&std::is_nothrow_move_constructible< E >::value); SWS_CORE_00356
swap 函数

Swap the contents of this instance with another one’s. This function shall behave the same as the corresponding std::promise function. ≙ std::promise

void swap (Promise &other) noexcept;

运算符

operator= 函数 2

Move assignment Abandons any shared state and then as if Promise(std::move(other)).swap(*this). ≙ std::move

重载 = 2
Promise & operator= (Promise &&other) noexcept; SWS_CORE_00343
Promise & operator= (const Promise &)=delete; SWS_CORE_00351

方法文档

函数 Promise [SWS_CORE_00341] Upstream: RS_AP_00130

Promise () noexcept;

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

Header-Datei#include "ara/core/future.h"
Scopeclass ara::core::Promise
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_00341
Status
valid/unmigrated
Version
AUTOSAR/AP/record/SWS_CORE_00341@rel:R25-11#d1288f75
Content hash
d1288f75
Source
https://www.autosar.org/fileadmin/standards/R25-11/AP/AUTOSAR_AP_SWS_Core.pdf#nameddest=SWS_CORE_00341
Status: valid/unmigrated Version: rel:R25-11#ad8790dc 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_00341@rel:R25-11#ad8790dc
Point-in-Time History:
Recorded Revisions (8):
  • R25-11rel:R25-11#0986205c2026-09-30
  • R19-11rel:R19-11#becb2d122026-10-14
  • R20-11rel:R20-11#530577522026-10-14
  • R21-11rel:R21-11#9a9686d12026-10-14
  • R22-11rel:R22-11#eece9f122026-10-14
  • R23-11rel:R23-11#68a9155a2026-10-14
  • R24-11rel:R24-11#7a7170b92026-10-14
  • R25-11rel:R25-11#ad8790dc2026-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

函数 Promise [SWS_CORE_00342] Upstream: RS_AP_00130

Promise (Promise &&other) noexcept;

Move constructor This function shall behave the same as the corresponding std::promise function.

Header-Datei#include "ara/core/future.h"
Scopeclass ara::core::Promise
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_00342
Status
valid/unmigrated
Version
AUTOSAR/AP/record/SWS_CORE_00342@rel:R25-11#54530f74
Content hash
54530f74
Source
https://www.autosar.org/fileadmin/standards/R25-11/AP/AUTOSAR_AP_SWS_Core.pdf#nameddest=SWS_CORE_00342
Status: valid/unmigrated Version: rel:R25-11#b87869d0 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_00342@rel:R25-11#b87869d0
Point-in-Time History:
Recorded Revisions (8):
  • R25-11rel:R25-11#48f770fd2026-09-30
  • R19-11rel:R19-11#47337e4f2026-10-14
  • R20-11rel:R20-11#7c95444f2026-10-14
  • R21-11rel:R21-11#e06b8a592026-10-14
  • R22-11rel:R22-11#d1f4110b2026-10-14
  • R23-11rel:R23-11#6d1133f82026-10-14
  • R24-11rel:R24-11#afc2a3c62026-10-14
  • R25-11rel:R25-11#b87869d02026-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

函数 Promise [SWS_CORE_00350] Upstream: RS_AP_00130

Promise (const Promise &)=delete;

Copy constructor shall be disabled.

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

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

Record
AUTOSAR/AP/record/SWS_CORE_00350
Status
valid/unmigrated
Version
AUTOSAR/AP/record/SWS_CORE_00350@rel:R25-11#fda2bd20
Content hash
fda2bd20
Source
https://www.autosar.org/fileadmin/standards/R25-11/AP/AUTOSAR_AP_SWS_Core.pdf#nameddest=SWS_CORE_00350
Status: valid/unmigrated Version: rel:R25-11#d2c392a4 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_00350@rel:R25-11#d2c392a4
Point-in-Time History:
Recorded Revisions (8):
  • R25-11rel:R25-11#3a63a36d2026-09-30
  • R19-11rel:R19-11#e6d29cc42026-10-14
  • R20-11rel:R20-11#bd55f3592026-10-14
  • R21-11rel:R21-11#bd55f3592026-10-14
  • R22-11rel:R22-11#9f08870d2026-10-14
  • R23-11rel:R23-11#cd2c53b02026-10-14
  • R24-11rel:R24-11#d2c392a42026-10-14
  • R25-11rel:R25-11#d2c392a42026-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

函数 SetError [SWS_CORE_00353] Upstream: RS_AP_00130

void SetError (E &&error) noexcept(std::is_nothrow_move_constructible< E >::value);

Move an error into the shared state and make the shared state ready.

Header-Datei#include "ara/core/future.h"
Scopeclass ara::core::Promise
Exception-Sicherheitconditionally exception safe
Thread-Sicherheitthread-safe
Verletzungen (Violations)IsoStdFutureEr- If the shared state already has a stored value or error. rcPromiseAl- readySatisfiedVio- lation PromiseNoShared- If *this has no shared state. StateToSetViola- tion

Parameter (in)

ParameterBeschreibung
errorthe error to store

Rückgabewert

TypBeschreibung
None

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

Record
AUTOSAR/AP/record/SWS_CORE_00353
Status
valid/unmigrated
Version
AUTOSAR/AP/record/SWS_CORE_00353@rel:R25-11#172e4412
Content hash
172e4412
Source
https://www.autosar.org/fileadmin/standards/R25-11/AP/AUTOSAR_AP_SWS_Core.pdf#nameddest=SWS_CORE_00353
Status: valid/unmigrated Version: rel:R25-11#bed318c8 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_00353@rel:R25-11#bed318c8
Point-in-Time History:
Recorded Revisions (8):
  • R25-11rel:R25-11#4d6aa6342026-09-30
  • R19-11rel:R19-11#17d203aa2026-10-14
  • R20-11rel:R20-11#483431492026-10-14
  • R21-11rel:R21-11#d246c4f32026-10-14
  • R22-11rel:R22-11#4e87e6272026-10-14
  • R23-11rel:R23-11#8177c2a32026-10-14
  • R24-11rel:R24-11#3effc9532026-10-14
  • R25-11rel:R25-11#bed318c82026-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

函数 SetError [SWS_CORE_00354] Upstream: RS_AP_00130

void SetError (const E &error) noexcept(std::is_nothrow_copy_ constructible< E >::value);

Copy an error into the shared state and make the shared state ready.

Header-Datei#include "ara/core/future.h"
Scopeclass ara::core::Promise
Exception-Sicherheitconditionally exception safe
Thread-Sicherheitthread-safe
Verletzungen (Violations)IsoStdFutureEr- If the shared state already has a stored value or error. rcPromiseAl- readySatisfiedVio- lation PromiseNoShared- If *this has no shared state. StateToSetViola- tion

Parameter (in)

ParameterBeschreibung
errorthe error to store

Rückgabewert

TypBeschreibung
None

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

Record
AUTOSAR/AP/record/SWS_CORE_00354
Status
valid/unmigrated
Version
AUTOSAR/AP/record/SWS_CORE_00354@rel:R25-11#839fdf52
Content hash
839fdf52
Source
https://www.autosar.org/fileadmin/standards/R25-11/AP/AUTOSAR_AP_SWS_Core.pdf#nameddest=SWS_CORE_00354
Status: valid/unmigrated Version: rel:R25-11#865b7aca 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_00354@rel:R25-11#865b7aca
Point-in-Time History:
Recorded Revisions (8):
  • R25-11rel:R25-11#4b69b7b22026-09-30
  • R19-11rel:R19-11#08af04582026-10-14
  • R20-11rel:R20-11#66d90e1c2026-10-14
  • R21-11rel:R21-11#ef5dc7082026-10-14
  • R22-11rel:R22-11#826b4e3c2026-10-14
  • R23-11rel:R23-11#3767dc562026-10-14
  • R24-11rel:R24-11#a3d044712026-10-14
  • R25-11rel:R25-11#865b7aca2026-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

函数 SetResult [SWS_CORE_00355] Upstream: RS_AP_00130

void SetResult (const Result< T, E > &result) noexcept(std::is_ nothrow_copy_constructible< T >::value &&std::is_nothrow_copy_ constructible< E >::value);

Copy a Result into the shared state and make the shared state ready.

Header-Datei#include "ara/core/future.h"
Scopeclass ara::core::Promise
Exception-Sicherheitconditionally exception safe
Thread-Sicherheitthread-safe
Verletzungen (Violations)IsoStdFutureEr- If the shared state already has a stored value or error. rcPromiseAl- readySatisfiedVio- lation PromiseNoShared- If *this has no shared state. StateToSetViola- tion

Parameter (in)

ParameterBeschreibung
resultthe result to store

Rückgabewert

TypBeschreibung
None

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

Record
AUTOSAR/AP/record/SWS_CORE_00355
Status
valid/unmigrated
Version
AUTOSAR/AP/record/SWS_CORE_00355@rel:R25-11#52ff5f97
Content hash
52ff5f97
Source
https://www.autosar.org/fileadmin/standards/R25-11/AP/AUTOSAR_AP_SWS_Core.pdf#nameddest=SWS_CORE_00355
Status: valid/unmigrated Version: rel:R25-11#eb823c26 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_00355@rel:R25-11#eb823c26
Point-in-Time History:
Recorded Revisions (7):
  • R25-11rel:R25-11#1c0f08392026-09-30
  • R20-11rel:R20-11#4c6f52702026-10-14
  • R21-11rel:R21-11#4c6f52702026-10-14
  • R22-11rel:R22-11#58e0871d2026-10-14
  • R23-11rel:R23-11#0c1607a72026-10-14
  • R24-11rel:R24-11#0b83bc582026-10-14
  • R25-11rel:R25-11#eb823c262026-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

函数 SetResult [SWS_CORE_00356] Upstream: RS_AP_00130

void SetResult (Result< T, E > &&result) noexcept(std::is_nothrow_ move_constructible< T >::value &&std::is_nothrow_move_constructible< E >::value);

Move a Result into the shared state and make the shared state ready.

Header-Datei#include "ara/core/future.h"
Scopeclass ara::core::Promise
Exception-Sicherheitconditionally exception safe
Thread-Sicherheitthread-safe
Verletzungen (Violations)IsoStdFutureEr- If the shared state already has a stored value or error. rcPromiseAl- readySatisfiedVio- lation PromiseNoShared- If *this has no shared state. StateToSetViola- tion

Parameter (in)

ParameterBeschreibung
resultthe result to store

Rückgabewert

TypBeschreibung
None

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

Record
AUTOSAR/AP/record/SWS_CORE_00356
Status
valid/unmigrated
Version
AUTOSAR/AP/record/SWS_CORE_00356@rel:R25-11#d6d8b8d0
Content hash
d6d8b8d0
Source
https://www.autosar.org/fileadmin/standards/R25-11/AP/AUTOSAR_AP_SWS_Core.pdf#nameddest=SWS_CORE_00356
Status: valid/unmigrated Version: rel:R25-11#445f8c93 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_00356@rel:R25-11#445f8c93
Point-in-Time History:
Recorded Revisions (7):
  • R25-11rel:R25-11#cae957a92026-09-30
  • R20-11rel:R20-11#558a00112026-10-14
  • R21-11rel:R21-11#558a00112026-10-14
  • R22-11rel:R22-11#dbcdc7d52026-10-14
  • R23-11rel:R23-11#9e711ec62026-10-14
  • R24-11rel:R24-11#0194828a2026-10-14
  • R25-11rel:R25-11#445f8c932026-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_future [SWS_CORE_00344] Upstream: RS_AP_00130

Future< T, E > get_future () noexcept;

Return an associated Future with the same shared state as *this The returned Future is set as soon as this Promise receives the result, value, or an error. This fuction must only be called once as it is not allowed to have multiple Futures per Promise.

Header-Datei#include "ara/core/future.h"
Scopeclass ara::core::Promise
Exception-Sicherheitexception safe
Thread-Sicherheitnot thread-safe
Verletzungen (Violations)IsoStdFutureErrc- If the function is called more than once on the same shared FutureAlreadyRe- state. trievedViolation IsoStdFutureErrc- If *this has no shared state. NoStateViolation

Rückgabewert

TypBeschreibung
Future< T, E >a Future with the same shared state as *this

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_00344
Status
valid/unmigrated
Version
AUTOSAR/AP/record/SWS_CORE_00344@rel:R25-11#b47d58e9
Content hash
b47d58e9
Source
https://www.autosar.org/fileadmin/standards/R25-11/AP/AUTOSAR_AP_SWS_Core.pdf#nameddest=SWS_CORE_00344
Status: valid/unmigrated Version: rel:R25-11#9636ce04 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_00344@rel:R25-11#9636ce04
Point-in-Time History:
Recorded Revisions (8):
  • R25-11rel:R25-11#f0a829512026-09-30
  • R19-11rel:R19-11#e89e1ade2026-10-14
  • R20-11rel:R20-11#4b3f3d5b2026-10-14
  • R21-11rel:R21-11#dc390e3a2026-10-14
  • R22-11rel:R22-11#d25873012026-10-14
  • R23-11rel:R23-11#616361012026-10-14
  • R24-11rel:R24-11#59190fca2026-10-14
  • R25-11rel:R25-11#9636ce042026-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_00343] Upstream: RS_AP_00130

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

Move assignment Abandons any shared state and then as if Promise(std::move(other)).swap(*this).

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

Parameter (in)

ParameterBeschreibung
otherthe other instance

Rückgabewert

TypBeschreibung
Promise &*this

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

Record
AUTOSAR/AP/record/SWS_CORE_00343
Status
valid/unmigrated
Version
AUTOSAR/AP/record/SWS_CORE_00343@rel:R25-11#3d33529a
Content hash
3d33529a
Source
https://www.autosar.org/fileadmin/standards/R25-11/AP/AUTOSAR_AP_SWS_Core.pdf#nameddest=SWS_CORE_00343
Status: valid/unmigrated Version: rel:R25-11#65fdcb27 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_00343@rel:R25-11#65fdcb27
Point-in-Time History:
Recorded Revisions (8):
  • R25-11rel:R25-11#2c46856d2026-09-30
  • R19-11rel:R19-11#dc654ee02026-10-14
  • R20-11rel:R20-11#f1806e3b2026-10-14
  • R21-11rel:R21-11#34acef442026-10-14
  • R22-11rel:R22-11#407a30d82026-10-14
  • R23-11rel:R23-11#10c10b722026-10-14
  • R24-11rel:R24-11#15d095072026-10-14
  • R25-11rel:R25-11#65fdcb272026-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_00351] Upstream: RS_AP_00130

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

Copy assignment operator shall be disabled.

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

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

Record
AUTOSAR/AP/record/SWS_CORE_00351
Status
valid/unmigrated
Version
AUTOSAR/AP/record/SWS_CORE_00351@rel:R25-11#ce659ce9
Content hash
ce659ce9
Source
https://www.autosar.org/fileadmin/standards/R25-11/AP/AUTOSAR_AP_SWS_Core.pdf#nameddest=SWS_CORE_00351
Status: valid/unmigrated Version: rel:R25-11#c5df3082 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_00351@rel:R25-11#c5df3082
Point-in-Time History:
Recorded Revisions (8):
  • R25-11rel:R25-11#9b9068f42026-09-30
  • R19-11rel:R19-11#6c16087a2026-10-14
  • R20-11rel:R20-11#02e45f892026-10-14
  • R21-11rel:R21-11#02e45f892026-10-14
  • R22-11rel:R22-11#8a967fd52026-10-14
  • R23-11rel:R23-11#b412d2772026-10-14
  • R24-11rel:R24-11#c5df30822026-10-14
  • R25-11rel:R25-11#c5df30822026-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

函数 set_value [SWS_CORE_00345] Upstream: RS_AP_00130

void set_value (const T &value) noexcept(std::is_nothrow_copy_ constructible< T >::value);

Copy a value into the shared state and make the shared state ready.

Header-Datei#include "ara/core/future.h"
Scopeclass ara::core::Promise
Exception-Sicherheitconditionally exception safe
Thread-Sicherheitthread-safe
Verletzungen (Violations)IsoStdFutureEr- If the shared state already has a stored value or error. rcPromiseAl- readySatisfiedVio- lation PromiseNoShared- If *this has no shared state. StateToSetViola- tion

Parameter (in)

ParameterBeschreibung
valuethe value to store

Rückgabewert

TypBeschreibung
None

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

Record
AUTOSAR/AP/record/SWS_CORE_00345
Status
valid/unmigrated
Version
AUTOSAR/AP/record/SWS_CORE_00345@rel:R25-11#5cb2cf5a
Content hash
5cb2cf5a
Source
https://www.autosar.org/fileadmin/standards/R25-11/AP/AUTOSAR_AP_SWS_Core.pdf#nameddest=SWS_CORE_00345
Status: valid/unmigrated Version: rel:R25-11#6b282783 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_00345@rel:R25-11#6b282783
Point-in-Time History:
Recorded Revisions (8):
  • R25-11rel:R25-11#f9783a292026-09-30
  • R19-11rel:R19-11#2c0ddcac2026-10-14
  • R20-11rel:R20-11#1095e01c2026-10-14
  • R21-11rel:R21-11#1095e01c2026-10-14
  • R22-11rel:R22-11#94a66b6c2026-10-14
  • R23-11rel:R23-11#49bb9caf2026-10-14
  • R24-11rel:R24-11#3a34547c2026-10-14
  • R25-11rel:R25-11#6b2827832026-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

函数 set_value [SWS_CORE_00346] Upstream: RS_AP_00130

void set_value (T &&value) noexcept(std::is_nothrow_move_ constructible< T >::value);

Move a value into the shared state and make the shared state ready.

Header-Datei#include "ara/core/future.h"
Scopeclass ara::core::Promise
Exception-Sicherheitconditionally exception safe
Thread-Sicherheitthread-safe
Verletzungen (Violations)IsoStdFutureEr- If the shared state already has a stored value or error. rcPromiseAl- readySatisfiedVio- lation PromiseNoShared- If *this has no shared state. StateToSetViola- tion

Parameter (in)

ParameterBeschreibung
valuethe value to store

Rückgabewert

TypBeschreibung
None

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

Record
AUTOSAR/AP/record/SWS_CORE_00346
Status
valid/unmigrated
Version
AUTOSAR/AP/record/SWS_CORE_00346@rel:R25-11#8fa3212c
Content hash
8fa3212c
Source
https://www.autosar.org/fileadmin/standards/R25-11/AP/AUTOSAR_AP_SWS_Core.pdf#nameddest=SWS_CORE_00346
Status: valid/unmigrated Version: rel:R25-11#56056ba3 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_00346@rel:R25-11#56056ba3
Point-in-Time History:
Recorded Revisions (8):
  • R25-11rel:R25-11#8b29c2042026-09-30
  • R19-11rel:R19-11#d1c271cd2026-10-14
  • R20-11rel:R20-11#2c1231622026-10-14
  • R21-11rel:R21-11#2c1231622026-10-14
  • R22-11rel:R22-11#6be6444f2026-10-14
  • R23-11rel:R23-11#7f5cd43e2026-10-14
  • R24-11rel:R24-11#cc28bc5f2026-10-14
  • R25-11rel:R25-11#56056ba32026-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

函数 swap [SWS_CORE_00352] Upstream: RS_AP_00130

void swap (Promise &other) noexcept;

Swap the contents of this instance with another one’s. This function shall behave the same as the corresponding std::promise function.

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

Parameter (in/out)

ParameterBeschreibung
otherthe other instance

Rückgabewert

TypBeschreibung
None

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

Record
AUTOSAR/AP/record/SWS_CORE_00352
Status
valid/unmigrated
Version
AUTOSAR/AP/record/SWS_CORE_00352@rel:R25-11#2b7dbb4b
Content hash
2b7dbb4b
Source
https://www.autosar.org/fileadmin/standards/R25-11/AP/AUTOSAR_AP_SWS_Core.pdf#nameddest=SWS_CORE_00352
Status: valid/unmigrated Version: rel:R25-11#34c2a151 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_00352@rel:R25-11#34c2a151
Point-in-Time History:
Recorded Revisions (8):
  • R25-11rel:R25-11#f15184862026-09-30
  • R19-11rel:R19-11#04fbb8542026-10-14
  • R20-11rel:R20-11#b552e9282026-10-14
  • R21-11rel:R21-11#b552e9282026-10-14
  • R22-11rel:R22-11#1e062be72026-10-14
  • R23-11rel:R23-11#9c97ab662026-10-14
  • R24-11rel:R24-11#4aff210a2026-10-14
  • R25-11rel:R25-11#34c2a1512026-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

函数 ~Promise [SWS_CORE_00349] Upstream: RS_AP_00130

~Promise () noexcept;

Destructor for Promise objects Abandons any shared state.

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

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

Record
AUTOSAR/AP/record/SWS_CORE_00349
Status
valid/unmigrated
Version
AUTOSAR/AP/record/SWS_CORE_00349@rel:R25-11#14dda9c6
Content hash
14dda9c6
Source
https://www.autosar.org/fileadmin/standards/R25-11/AP/AUTOSAR_AP_SWS_Core.pdf#nameddest=SWS_CORE_00349
Status: valid/unmigrated Version: rel:R25-11#d3ab1bdc 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_00349@rel:R25-11#d3ab1bdc
Point-in-Time History:
Recorded Revisions (8):
  • R25-11rel:R25-11#170408342026-09-30
  • R19-11rel:R19-11#d48e92272026-10-14
  • R20-11rel:R20-11#f8e702f92026-10-14
  • R21-11rel:R21-11#536b31e32026-10-14
  • R22-11rel:R22-11#0e8726472026-10-14
  • R23-11rel:R23-11#9b91cb7e2026-10-14
  • R24-11rel:R24-11#cea546db2026-10-14
  • R25-11rel:R25-11#d3ab1bdc2026-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