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

उपयोगकर्ता गाइडएआई जनित

थ्रेड्स के पार किसी संबद्ध फ्यूचर को मान या त्रुटियाँ पास करने के लिए एक एसिंक्रोनस चैनल प्रदान करता है।
एआई-जनित असत्यापित मॉडल: gemini-3.8-flash-medium · प्रयास: medium · तापमान: नियंत्रित नहीं किया जा सकता · प्रॉम्प्ट: 5c323bf911df उद्गम खुले प्रश्न (1)
जर्मन मार्गदर्शिका से अनूदितgemini-3.8-flash-low · 2026-10-13 · जर्मन मूल

थ्रेड्स के पार किसी संबद्ध फ्यूचर को मान या त्रुटियाँ पास करने के लिए एक एसिंक्रोनस चैनल प्रदान करता है।

वर्ग ara::core::Promise मानों, त्रुटियों या परिणामों को थ्रेड्स के पार एक साझा स्थिति में स्थानांतरित करने के लिए एक एसिंक्रोनस राइट-एंडपॉइंट के रूप में कार्य करता है [SWS_CORE_00341]। पढ़ने की पहुँच केवल एक बार प्राप्त करने योग्य Future के माध्यम से होती है, जो परिणाम प्रदान किए जाने पर जारी की जाती है [SWS_CORE_00344]। चूंकि वर्ग गैर-प्रतिलिपि योग्य है, स्थिति मूव सिमेंटिक्स के माध्यम से पूरी तरह से अद्वितीय स्वामित्व में रहती है, जिसमें परिणाम को कई बार सेट करना या फ्यूचर को कई बार प्राप्त करना मानकीकृत उल्लंघनों की ओर ले जाता है।

संदर्भ

वर्ग 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) के रूप में घोषित किया गया है।

हालाँकि, यह वर्ग मूव सिमेंटिक्स का समर्थन करता है। मूव कंस्ट्रक्टर स्रोत इंस्टेंस [SWS_CORE_00342] की साझा स्थिति को संभालता है। मूव असाइनमेंट के मामले में, लक्ष्य इंस्टेंस अपनी पिछली साझा स्थिति को छोड़ देता है और स्वैप ऑपरेशन के समान पास किए गए ऑब्जेक्ट की स्थिति को संभालता है [SWS_CORE_00343]। इसके अतिरिक्त, विधि swap किसी अन्य इंस्टेंस के साथ आंतरिक स्थिति की अदला-बदली को सक्षम बनाती है [SWS_CORE_00352]। डिस्ट्रक्टर के माध्यम से नष्ट होने पर, अभी भी रखी गई साझा स्थिति जारी की जाती है या छोड़ दी जाती है [SWS_CORE_00349]। जबकि डिफ़ॉल्ट कंस्ट्रक्टर थ्रेड-सुरक्षित डिज़ाइन किया गया है [SWS_CORE_00341], मूव संचालन, असाइनमेंट, स्वैप और विनाश थ्रेड-सुरक्षित नहीं हैं ([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 प्राप्त करना: एसिंक्रोनस प्रोसेसिंग शुरू होने से पहले, प्रोड्यूसर [SWS_CORE_00344] पर get_future() को कॉल करता है। चूंकि प्रति Promise केवल एक संबद्ध Future की अनुमति है, इसलिए यह कॉल ठीक एक बार की जानी चाहिए। लौटाया गया Future कंज्यूम करने वाले थ्रेड को सौंप दिया जाता है।
  3. परिणाम सेट करना: एसिंक्रोनस ऑपरेशन पूरा होने के बाद, प्रोड्यूसर परिणाम को साझा स्थिति (shared state) में स्थानांतरित करता है और इसे ready स्थिति में ले आता है। इसके लिए कॉपी और मूव ऑपरेशन्स हेतु थ्रेड-सुरक्षित ओवरलोड क्रमशः उपलब्ध हैं:
Promise और Future के माध्यम से एसिंक्रोनस प्रावधानErzeugerPromiseSharedStateFutureVerbraucherPromise()Erzeuge Shared Stateget_future()शेयर्ड स्टेट के साथ Future बनाएंFuture पास करेंaltErfolgsfall: 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 (रिलीज़ 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#8ee9ea6b
Content hash
8ee9ea6b
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#e34f256d
Content hash
e34f256d
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#a69cb264
Content hash
a69cb264
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#bc3e3307
Content hash
bc3e3307
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#0e62f69a
Content hash
0e62f69a
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#4092baa5
Content hash
4092baa5
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#10e18199
Content hash
10e18199
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#de54ce3b
Content hash
de54ce3b
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#1605af79
Content hash
1605af79
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#560a4fa3
Content hash
560a4fa3
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#a7c0f762
Content hash
a7c0f762
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#4c7f3b71
Content hash
4c7f3b71
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#b6ee64b6
Content hash
b6ee64b6
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#cb0c22ac
Content hash
cb0c22ac
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