DEENESPTFRRUARHIKOZHNL

क्लास ara::core::Future

[SWS_CORE_00321] Upstream: RS_AP_00130

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

Implementation of std::future from [future.syn] in [11]. The implementation shall flag the condition E != ara::core::ErrorCode as a compile error.

Literaturverzeichnis SWS Core: [11] ISO/IEC 14882:2017, Programming languages – C++ – www.iso.org

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

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

समवर्ती ऑपरेशन से मानों और त्रुटियों के तुल्यकालिक (synchronous) या अतुल्यकालिक (asynchronous) रिसेप्शन को सक्षम बनाता है।
एआई-जनित असत्यापित मॉडल: gemini-3.8-flash-medium · प्रयास: medium · तापमान: नियंत्रित नहीं किया जा सकता · प्रॉम्प्ट: fbd974cb6be2 उद्गम खुले प्रश्न (1)
जर्मन मार्गदर्शिका से अनूदितgemini-3.8-flash-low · 2026-10-13 · जर्मन मूल

समवर्ती ऑपरेशन से मानों और त्रुटियों के तुल्यकालिक (synchronous) या अतुल्यकालिक (asynchronous) रिसेप्शन को सक्षम बनाता है।

वर्ग ara::core::Future एक अतुल्यकालिक ऑपरेशन के परिणाम के लिए रिसीवर हैंडल के रूप में कार्य करता है और एक साझा स्थिति [SWS_CORE_00327] तक पहुँच का प्रबंधन करता है। उपभोक्ता गैर-अवरुद्ध तरीके से स्थिति की जाँच कर सकते हैं, पूरा होने के लिए तुल्यकालिक रूप से प्रतीक्षा कर सकते हैं, या GetResult() के माध्यम से बिना किसी अपवाद के ara::core::Result के रूप में परिणाम प्राप्त कर सकते हैं [SWS_CORE_00336]। चूँकि कॉपी ऑपरेशन्स हटा दिए गए हैं, स्वामित्व अनन्य रूप से प्रबंधित होता है, और परिणाम प्राप्त करने या कंटिन्यूएशन के माध्यम से अग्रेषित करने के तुरंत बाद ऑब्जेक्ट अमान्य हो जाता है।

संदर्भ

टेम्पलेट वर्ग ara::core::Future AUTOSAR Adaptive Platform के भीतर अतुल्यकालिक ऑपरेशन्स के परिणामों के लिए रिसीवर एंड-एलिमेंट का प्रतिनिधित्व करता है। यह एक साझा स्थिति (Shared State) तक नियंत्रित पहुँच को सक्षम बनाता है, जिसे एक निर्माता इंस्टेंस द्वारा अतुल्यकालिक रूप से भरा जाता है [SWS_CORE_00327]। वैचारिक रूप से, यह वर्ग C++17 मानक ISO/IEC 14882:2017 [11] से std::future को लागू करता है, लेकिन प्लेटफ़ॉर्म की त्रुटि-अपवाद-आधारित अवधारणा में निर्बाध रूप से एकीकृत होता है: टेम्पलेट पैरामीटर E के लिए त्रुटि प्रकार ara::core::ErrorCode अनिवार्य रूप से निर्दिष्ट है; कोई भी भिन्न विनिर्देश कंपाइलेशन त्रुटि की ओर ले जाता है। प्राथमिक इंटरैक्शन भागीदारों में अतुल्यकालिक निर्माता (जैसे कि संबद्ध Promise), जो मान या त्रुटि प्रदान करता है, अनन्य रिसीवर के रूप में Future इंस्टेंस, साथ ही एक उपभोक्ता या निष्पादन संदर्भ (ExecutorT) शामिल हैं, जिसे बाद के कार्य सौंपे जाते हैं [SWS_CORE_00331] [SWS_CORE_00337]।

जीवनचक्र

ara::core::Future का निर्माण, स्थिति प्रबंधन और विनाश नियतात्मक स्वामित्व संबंधों को सुनिश्चित करने के लिए सख्त नियमों के अधीन है:

  • निर्माण: डिफ़ॉल्ट कन्स्ट्रक्टर Shared State के बिना एक खाली इंस्टेंस बनाता है, जिसके लिए valid() == false लागू होता है [SWS_CORE_00322] [SWS_CORE_00327]। व्याख्या: मान्य इंस्टेंस नियमित रूप से अतुल्यकालिक प्लेटफ़ॉर्म इंटरफेस या युग्मित Promise ऑब्जेक्ट्स के माध्यम से उत्पन्न होते हैं। प्रश्न Q-6149efe498e0f5f6 (खुला)
  • स्वामित्व और स्थानांतरण: कॉपी कन्स्ट्रक्टर और कॉपी असाइनमेंट ऑपरेटर स्पष्ट रूप से हटा दिए गए हैं (delete), जिससे एक्सेस हैंडल का दोहराव असंभव हो जाता है [SWS_CORE_00334] [SWS_CORE_00335]। मूव कन्स्ट्रक्टर और मूव असाइनमेंट ऑपरेटर के माध्यम से इंस्टेंस को स्थानांतरित करना (Move) संभव है और यह Shared State के स्वामित्व को पूरी तरह से स्थानांतरित करता है [SWS_CORE_00323] [SWS_CORE_00325]।
  • स्थितियाँ और संक्रमण: स्थिति अमान्य (valid() == false), मान्य-लंबित (valid() == true, is_ready() == false) और तैयार (valid() == true, is_ready() == true) में विभाजित है [SWS_CORE_00327] [SWS_CORE_00332]। GetResult() या get() के माध्यम से सफल परिणाम पुनर्प्राप्ति के बाद और then() के माध्यम से अग्रेषण के बाद, ऑब्जेक्ट अपनी स्थिति खो देता है और तुरंत अमान्य हो जाता है (valid() == false) [SWS_CORE_00326] [SWS_CORE_00331] [SWS_CORE_00336] [SWS_CORE_00337]।
  • विनाश: डिस्ट्रक्टर ~Future() अभी भी बनाए रखी गई Shared State को छोड़ देता है [SWS_CORE_00333]। यदि कंटिन्यूएशन पंजीकृत किए गए हैं, तो लौटाए गए इंस्टेंस का डिस्ट्रक्टर तब तक ब्लॉक रहता है जब तक कि पहले से चल रहा कंटिन्यूएशन फ़ंक्शन पूरी तरह से निष्पादित नहीं हो जाता [SWS_CORE_00331] [SWS_CORE_00337]।
  • समवर्तीता: स्थिति मेथड valid() और is_ready() थ्रेड-सुरक्षित हैं [SWS_CORE_00327] [SWS_CORE_00332]। अन्य सभी इंटरफेस – जिनमें wait(), wait_for(), wait_until(), GetResult(), get(), then() और डिस्ट्रक्टर शामिल हैं – एक ही इंस्टेंस के लिए थ्रेड-सुरक्षित नहीं हैं [SWS_CORE_00323] [SWS_CORE_00325] [SWS_CORE_00326] [SWS_CORE_00328] [SWS_CORE_00329] [SWS_CORE_00330] [SWS_CORE_00331] [SWS_CORE_00333] [SWS_CORE_00336] [SWS_CORE_00337]।
future_lifecycle Invalid Ungueltig (valid() == false) ValidPending Gueltig / Ausstehend (valid() == true, is_ready() == false) Invalid->ValidPending Move-Zuweisung / Erhalt ValidPending->Invalid Destruktor / then() ValidReady Gueltig / Bereit (valid() == true, is_ready() == true) ValidPending->ValidReady Promise मान या त्रुटि सेट करता है ValidReady->Invalid GetResult() / get() / then()

स्थिति आरेख (State diagram): Shared State की वैधता और उपलब्धता के संबंध में Future इंस्टेंस का जीवनचक्र और स्थिति संक्रमण। स्रोत: [SWS_CORE_00322], [SWS_CORE_00326], [SWS_CORE_00327], [SWS_CORE_00331], [SWS_CORE_00332], [SWS_CORE_00333], [SWS_CORE_00336]

उपयोग पथ

परिणाम प्रोसेसिंग के लिए एक विशिष्ट उपयोग पथ निम्नलिखित चरणों में विभाजित है:

  1. स्थिति जाँच और तुल्यकालन: is_ready() के साथ पहले से यह निर्धारित किया जा सकता है कि अतुल्यकालिक परिणाम पहले से उपलब्ध है या नहीं [SWS_CORE_00332]। यदि ऐसा है, तो बाद के कॉल गारंटीकृत रूप से ब्लॉक नहीं होंगे [SWS_CORE_00332]। अन्यथा, wait() के साथ असीमित रूप से [SWS_CORE_00328] या wait_for() अथवा wait_until() के माध्यम से समय-सीमित रूप से सिंक्रनाइज़ किया जा सकता है [SWS_CORE_00329] [SWS_CORE_00330]।
  2. परिणाम निष्कर्षण: AUTOSAR Adaptive अनुप्रयोगों में GetResult() का कॉल निर्णायक है: यह मेथड आवश्यकता पड़ने पर ब्लॉक करता है, लेकिन कभी भी अपवाद नहीं देता है और मान या त्रुटि को Move के माध्यम से ara::core::Result<T, E> के रूप में पास करता है [SWS_CORE_00336]। मेथड get() STL-अनुरूपता प्रदान करता है, त्रुटि के मामले में C++ अपवाद थ्रो करता है, और टूलचेन की अपवाद हैंडलिंग अक्षम होने पर ओवरलोड समाधान में भाग नहीं लेता है [SWS_CORE_00326]।
  3. एसिंक्रोनस चेनिंग (Continuations): सिंक्रोनस ब्लॉकिंग के स्थान पर then() के माध्यम से एक कॉलबैक पंजीकृत किया जा सकता है, वैकल्पिक रूप से किसी निष्पादन संदर्भ (Executor) [SWS_CORE_00331] [SWS_CORE_00337] को असाइनमेंट के साथ। कॉलबैक परिणाम को एक Result<T, E>-Rvalue के रूप में स्वीकार करता है। यदि कन्टीन्यूएशन फ़ंक्शन स्वयं एक Future या Result लौटाता है, तो then() स्वचालित अनरैपिंग करता है और सीधे एक संबंधित Future<T2, E2> [SWS_CORE_00331] [SWS_CORE_00337] प्रदान करता है।
GetResult() के साथ एसिंक्रोनस प्रवाहकॉलरFuturePromiseErzeugt Shared State & FutureUebergabe an KonsumentUse Case: तुल्यकालन और पुनर्प्राप्तिis_ready()falseSetResult(...) / SetError(...)GetResult()Shared State geleertvalid() == falseResult<T, E>

अनुक्रम आरेख: GetResult() के माध्यम से एसिंक्रोनस सिंक्रोनाइज़ेशन और परिणाम पुनर्प्राप्ति का विशिष्ट प्रवाह। स्रोत: [SWS_CORE_00327], [SWS_CORE_00332], [SWS_CORE_00336]

त्रुटि परिदृश्य

ara::core::Future के उपयोग में निम्नलिखित त्रुटि स्थितियाँ निर्दिष्ट हैं:

  • अमान्य इंस्टेंस पर कॉल: किसी अमान्य इंस्टेंस (valid() == false) पर is_ready(), wait(), wait_for(), wait_until(), GetResult() या then() को कॉल करना एक FutureInvalidViolation दर्शाता है [SWS_CORE_00328] [SWS_CORE_00329] [SWS_CORE_00330] [SWS_CORE_00331] [SWS_CORE_00332] [SWS_CORE_00336] [SWS_CORE_00337]। इस मामले में get() को कॉल करने पर त्रुटि कोड kNoState के साथ एक FutureException थ्रो किया जाता है [SWS_CORE_00326]।
  • परित्यक्त साझा स्थिति (Broken Promise): यदि संबद्ध प्रॉमिस द्वारा साझा स्थिति को समय से पहले छोड़ दिया जाता है, तो GetResult() मानकीकृत त्रुटि कोड FutureErrc::kBrokenPromise के साथ एक Result लौटाता है [SWS_CORE_00336]। get() को कॉल करने पर संबंधित अपवाद ट्रिगर होता है [SWS_CORE_00326]।
  • कन्टीन्यूएशन फ़ंक्शन्स में अपवाद: एक पंजीकृत कन्टीन्यूएशन को अपवाद थ्रो नहीं करने चाहिए, सिवाय किसी वॉयलेशन के कार्यान्वयन के। यदि यह फिर भी कोई अपवाद उत्पन्न करता है, तो इसके परिणामस्वरूप FutureContinuationHasThrownViolation [SWS_CORE_00331] [SWS_CORE_00337] होता है। क्लोज़र्स में अपवादों को पकड़ा जाना चाहिए और Result या Future के रूप में एक त्रुटि स्थिति के रूप में लौटाया जाना चाहिए [SWS_CORE_00331] [SWS_CORE_00337]।

यह गाइड विशेष रूप से AUTOSAR Adaptive Core (R25-11) की विनिर्देश आवश्यकताओं पर आधारित है।

सदस्य मानचित्र

कंस्ट्रक्टर और डिस्ट्रक्टर

2

ऑपरेटर

1

क्लास आरेख

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

G nara__core__Future930 Future + 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=default; SWS_CORE_00322
Future (Future &&other) noexcept; SWS_CORE_00323
Future (const Future &)=delete; SWS_CORE_00334
~Future फ़ंक्शन

Destructor for Future objects. Abandons any shared state

~Future () noexcept;

मेथड

get फ़ंक्शन

Get the value.

T get () noexcept(false);
GetResult फ़ंक्शन

Get the result.

Result< T, E > GetResult () noexcept(std::is_nothrow_move_ constructible< T >::value &&std::is_nothrow_move_constructible< E >::value);
is_ready फ़ंक्शन

Return whether the asynchronous operation has finished.

bool is_ready () const noexcept;
then फ़ंक्शन 2

Create a new Future with the content returned by func when passed the Result of this Future. The callable func may be called in the context of this call or in the context of • Promise::set_result(const T&) • Promise::set_result(T&&) • Promise::SetError(E&&) • Promise::SetError(const E&) or somewhere else.

ओवरलोड then 2
template <typename F> auto then (F &&func) noexcept -> Future< <see below> >; SWS_CORE_00331
template <typename F, typename ExecutorT> auto then (F &&func, ExecutorT &&executor) noexcept -> Future< <see below> >; SWS_CORE_00337
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.

void wait () const noexcept;
wait_for फ़ंक्शन

Wait for the timeoutDuration or until a value or an error is available.

template <typename Rep, typename Period> FutureStatus wait_for (const std::chrono::duration< Rep, Period > &timeoutDuration) const noexcept;
wait_until फ़ंक्शन

Wait until the deadline or until a value or an error is available.

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_00325
Future & operator= (const Future &)=delete; SWS_CORE_00335

मेथड का प्रलेखन

फ़ंक्शन Future [SWS_CORE_00322] Upstream: RS_AP_00130

Future () noexcept=default;

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
Exception-Sicherheitexception safe

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

Record
AUTOSAR/AP/record/SWS_CORE_00322
Status
valid/unmigrated
Version
AUTOSAR/AP/record/SWS_CORE_00322@rel:R25-11#14ea668e
Content hash
14ea668e
Source
https://www.autosar.org/fileadmin/standards/R25-11/AP/AUTOSAR_AP_SWS_Core.pdf#nameddest=SWS_CORE_00322
Status: valid/unmigrated Version: rel:R25-11#869eb074 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_00322@rel:R25-11#869eb074
Point-in-Time History:
Recorded Revisions (8):
  • R25-11rel:R25-11#f20c46ff2026-09-30
  • R19-11rel:R19-11#dea6599e2026-10-14
  • R20-11rel:R20-11#40f0427d2026-10-14
  • R21-11rel:R21-11#40f0427d2026-10-14
  • R22-11rel:R22-11#3116da522026-10-14
  • R23-11rel:R23-11#42749bfd2026-10-14
  • R24-11rel:R24-11#27bc40832026-10-14
  • R25-11rel:R25-11#869eb0742026-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_00323] 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
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_00323
Status
valid/unmigrated
Version
AUTOSAR/AP/record/SWS_CORE_00323@rel:R25-11#4b293225
Content hash
4b293225
Source
https://www.autosar.org/fileadmin/standards/R25-11/AP/AUTOSAR_AP_SWS_Core.pdf#nameddest=SWS_CORE_00323
Status: valid/unmigrated Version: rel:R25-11#67bc21d5 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_00323@rel:R25-11#67bc21d5
Point-in-Time History:
Recorded Revisions (8):
  • R25-11rel:R25-11#16df79b52026-09-30
  • R19-11rel:R19-11#8b1810862026-10-14
  • R20-11rel:R20-11#d2675b492026-10-14
  • R21-11rel:R21-11#9ce1ca602026-10-14
  • R22-11rel:R22-11#62a98b892026-10-14
  • R23-11rel:R23-11#d38da6892026-10-14
  • R24-11rel:R24-11#7f1618232026-10-14
  • R25-11rel:R25-11#67bc21d52026-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_00334] Upstream: RS_AP_00130

Future (const Future &)=delete;

Copy constructor shall be disabled

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

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

Record
AUTOSAR/AP/record/SWS_CORE_00334
Status
valid/unmigrated
Version
AUTOSAR/AP/record/SWS_CORE_00334@rel:R25-11#cc724952
Content hash
cc724952
Source
https://www.autosar.org/fileadmin/standards/R25-11/AP/AUTOSAR_AP_SWS_Core.pdf#nameddest=SWS_CORE_00334
Status: valid/unmigrated Version: rel:R25-11#1f07079c 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_00334@rel:R25-11#1f07079c
Point-in-Time History:
Recorded Revisions (8):
  • R25-11rel:R25-11#108bb8a72026-09-30
  • R19-11rel:R19-11#4a6d37412026-10-14
  • R20-11rel:R20-11#a10780802026-10-14
  • R21-11rel:R21-11#2f2e218f2026-10-14
  • R22-11rel:R22-11#2129f6a42026-10-14
  • R23-11rel:R23-11#ce09ab2b2026-10-14
  • R24-11rel:R24-11#7862d2022026-10-14
  • R25-11rel:R25-11#1f07079c2026-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_00336] Upstream: RS_AP_00130

Result< T, E > GetResult () noexcept(std::is_nothrow_move_ constructible< T >::value &&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.

As per std::future, after this function is called the Future is no longer valid ( valid() ==FALSE ).

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

Rückgabewert

TypBeschreibung
Result< T, E >a ara::core::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: • – 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].

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_00336
Status
valid/unmigrated
Version
AUTOSAR/AP/record/SWS_CORE_00336@rel:R25-11#7be8755c
Content hash
7be8755c
Source
https://www.autosar.org/fileadmin/standards/R25-11/AP/AUTOSAR_AP_SWS_Core.pdf#nameddest=SWS_CORE_00336
Status: valid/unmigrated Version: rel:R25-11#0af67485 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_00336@rel:R25-11#0af67485
Point-in-Time History:
Recorded Revisions (8):
  • R25-11rel:R25-11#7983aa762026-09-30
  • R19-11rel:R19-11#1ac6dc312026-10-14
  • R20-11rel:R20-11#652256322026-10-14
  • R21-11rel:R21-11#652256322026-10-14
  • R22-11rel:R22-11#8964f0202026-10-14
  • R23-11rel:R23-11#2380a90e2026-10-14
  • R24-11rel:R24-11#09c337922026-10-14
  • R25-11rel:R25-11#0af674852026-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_00326] Upstream: RS_AP_00130

T get () noexcept(false);

Get the value.

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

As per std::future, after this function is called the Future is no longer valid ( valid() ==FALSE ).

एआई-जनित असत्यापित मॉडल: gemini-3.8-flash-medium · प्रयास: medium · तापमान: नियंत्रित नहीं किया जा सकता · प्रॉम्प्ट: bdf8e21a85ce उद्गम
जर्मन मार्गदर्शिका से अनूदितgemini-3.8-flash-low · 2026-10-13 · जर्मन मूल

उपयोग

मेथड get() सिंक्रोनस रूप से ara::core::Future से T प्रकार का परिणाम प्राप्त करती है [SWS_CORE_00326]। फ़ंक्शन std::future में अपने समकक्ष के समान व्यवहार करता है; यदि एसिंक्रोनस गणना अभी भी जारी है, तो कॉल पूरा होने तक या त्रुटि होने तक ब्लॉक रहता है [SWS_CORE_00336]। कॉल के कारण ऑब्जेक्ट अपनी स्थिति खो देता है, जिससे Future तुरंत अमान्य हो जाता है (valid() == false) [SWS_CORE_00326]। is_ready() के माध्यम से एक नॉन-ब्लॉकिंग कॉल को पहले से सुरक्षित किया जा सकता है [SWS_CORE_00332]।

त्रुटि प्रबंधन

विफलताएं C++ अपवादों के माध्यम से रिपोर्ट की जाती हैं [SWS_CORE_00326]:

  • यदि संबद्ध Promise में SetError() या SetResult() के माध्यम से कोई त्रुटि संग्रहीत की गई थी, तो संबंधित त्रुटि प्रकार का एक अपवाद उठाया जाता है [SWS_CORE_00326]।
  • यदि एसिंक्रोनस ऑपरेशन द्वारा साझा स्थिति (shared state) को समय से पहले छोड़ दिया जाता है, तो इसके परिणामस्वरूप FutureErrc के अनुसार त्रुटि kBrokenPromise होती है [SWS_CORE_00326], [SWS_CORE_00400]।
  • यदि कॉल किसी अमान्य इंस्टेंस पर की जाती है, तो त्रुटि कोड kNoState के साथ FutureException फेंका जाता है [SWS_CORE_00326]।

समवर्तीता और प्रतिबंध

ऑपरेशन न तो थ्रेड-सुरक्षित है और न ही अपवाद-सुरक्षित (not exception safe) [SWS_CORE_00326]। कई थ्रेड्स से एक ही Future के समवर्ती एक्सेस के लिए बाहरी सिंक्रोनाइज़ेशन की आवश्यकता होती है। यदि कंपाइलर टूलचेन में अपवाद अक्षम हैं, तो get() ओवरलोड रिज़ॉल्यूशन में भाग नहीं लेता है [SWS_CORE_00326]; इस मामले के लिए, अपवाद-मुक्त विकल्प GetResult() मौजूद है [SWS_CORE_00336]। बिना रिटर्न मान वाले इंस्टेंस के लिए, विशेषज्ञता Future<void, E>::get() उपलब्ध है [SWS_CORE_06226]।

यह उपयोग संबंधी निर्देश AUTOSAR Adaptive R25-11 विनिर्देश के आधार पर स्वचालित रूप से तैयार किया गया था।

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

Rückgabewert

TypBeschreibung
Tvalue of type T

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 if 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_00326
Status
valid/unmigrated
Version
AUTOSAR/AP/record/SWS_CORE_00326@rel:R25-11#54235858
Content hash
54235858
Source
https://www.autosar.org/fileadmin/standards/R25-11/AP/AUTOSAR_AP_SWS_Core.pdf#nameddest=SWS_CORE_00326
Status: valid/unmigrated Version: rel:R25-11#86352c5a 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_00326@rel:R25-11#86352c5a
Point-in-Time History:
Recorded Revisions (8):
  • R25-11rel:R25-11#772635442026-09-30
  • R19-11rel:R19-11#bf2bb1bc2026-10-14
  • R20-11rel:R20-11#1b0259a32026-10-14
  • R21-11rel:R21-11#e72dc9d62026-10-14
  • R22-11rel:R22-11#5fce45d52026-10-14
  • R23-11rel:R23-11#2294bfde2026-10-14
  • R24-11rel:R24-11#83b80b3f2026-10-14
  • R25-11rel:R25-11#86352c5a2026-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_00332] Upstream: RS_AP_00130

bool is_ready () const noexcept;

Return whether the asynchronous operation has finished.

If this function returns TRUE, get(), GetResult() and the wait() calls are guaranteed not to block.

Header-Datei#include "ara/core/future.h"
Scopeclass ara::core::Future
Exception-Sicherheitexception safe
Thread-Sicherheitthread-safe
Verletzungen (Violations)FutureInvalidVio- If the Future is invalid ( valid() ==FALSE ). lation

Rückgabewert

TypBeschreibung
bool• TRUE: the Future contains a value or an error • FALSE: the Future does NOT contain a value or an error

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

Record
AUTOSAR/AP/record/SWS_CORE_00332
Status
valid/unmigrated
Version
AUTOSAR/AP/record/SWS_CORE_00332@rel:R25-11#9ea2fe66
Content hash
9ea2fe66
Source
https://www.autosar.org/fileadmin/standards/R25-11/AP/AUTOSAR_AP_SWS_Core.pdf#nameddest=SWS_CORE_00332
Status: valid/unmigrated Version: rel:R25-11#3a721122 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_00332@rel:R25-11#3a721122
Point-in-Time History:
Recorded Revisions (8):
  • R25-11rel:R25-11#7b5a5cd82026-09-30
  • R19-11rel:R19-11#1351fbd62026-10-14
  • R20-11rel:R20-11#29432cbf2026-10-14
  • R21-11rel:R21-11#5f5d2ce12026-10-14
  • R22-11rel:R22-11#5dc081682026-10-14
  • R23-11rel:R23-11#377e18d72026-10-14
  • R24-11rel:R24-11#3361542e2026-10-14
  • R25-11rel:R25-11#3a7211222026-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_00325] 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
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_00325
Status
valid/unmigrated
Version
AUTOSAR/AP/record/SWS_CORE_00325@rel:R25-11#b474cbe9
Content hash
b474cbe9
Source
https://www.autosar.org/fileadmin/standards/R25-11/AP/AUTOSAR_AP_SWS_Core.pdf#nameddest=SWS_CORE_00325
Status: valid/unmigrated Version: rel:R25-11#aaf376df 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_00325@rel:R25-11#aaf376df
Point-in-Time History:
Recorded Revisions (8):
  • R25-11rel:R25-11#13e5b1852026-09-30
  • R19-11rel:R19-11#93353d342026-10-14
  • R20-11rel:R20-11#3bdb585e2026-10-14
  • R21-11rel:R21-11#a4d956ef2026-10-14
  • R22-11rel:R22-11#9c832db92026-10-14
  • R23-11rel:R23-11#c2dbc2b52026-10-14
  • R24-11rel:R24-11#5c0627a82026-10-14
  • R25-11rel:R25-11#aaf376df2026-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_00335] Upstream: RS_AP_00130

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

Copy assignment operator shall be disabled

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

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

Record
AUTOSAR/AP/record/SWS_CORE_00335
Status
valid/unmigrated
Version
AUTOSAR/AP/record/SWS_CORE_00335@rel:R25-11#9dd9d110
Content hash
9dd9d110
Source
https://www.autosar.org/fileadmin/standards/R25-11/AP/AUTOSAR_AP_SWS_Core.pdf#nameddest=SWS_CORE_00335
Status: valid/unmigrated Version: rel:R25-11#9bdef4fb 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_00335@rel:R25-11#9bdef4fb
Point-in-Time History:
Recorded Revisions (8):
  • R25-11rel:R25-11#b9b4dead2026-09-30
  • R19-11rel:R19-11#3780a25f2026-10-14
  • R20-11rel:R20-11#7f6cf9742026-10-14
  • R21-11rel:R21-11#7f6cf9742026-10-14
  • R22-11rel:R22-11#b8baf3702026-10-14
  • R23-11rel:R23-11#e09e21542026-10-14
  • R24-11rel:R24-11#bb38b8c92026-10-14
  • R25-11rel:R25-11#9bdef4fb2026-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_00331] 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. The callable func may be called in the context of this call or in the context of • Promise::set_result(const T&) • Promise::set_result(T&&) • Promise::SetError(E&&) • Promise::SetError(const E&) or somewhere else.

valid() ==FALSE on the original Future object immediately after it returns.

The Callable input argument func takes a Result<T,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<T,E>>). Return type deduction: • 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 then(...) are registered in the Future F that 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.

एआई-जनित असत्यापित मॉडल: gemini-3.8-flash-medium · प्रयास: medium · तापमान: नियंत्रित नहीं किया जा सकता · प्रॉम्प्ट: 771d2952e4cb उद्गम
जर्मन मार्गदर्शिका से अनूदितgemini-3.8-flash-low · 2026-10-13 · जर्मन मूल

मेंबर फ़ंक्शन then एसिंक्रोनस गणनाओं को श्रृंखलाबद्ध करने का काम करता है और ara::core::Future के एक इंस्टेंस पर एक कॉलेबल ऑब्जेक्ट func को कंटीन्यूएशन के रूप में पंजीकृत करता है [SWS_CORE_00331]। कॉल के लौटने के बाद, मूल Future अमान्य हो जाता है (valid() == false)। कॉल लक्ष्य को GetResult() के माध्यम से प्राप्त इंस्टेंस का परिणाम Result<T, E> प्रकार के Rvalue के रूप में प्राप्त होता है [SWS_CORE_00331]।

then का रिटर्न प्रकार कंटीन्यूएशन [SWS_CORE_00331] के रिटर्न प्रकार U पर निर्भर करता है:

  • यदि func एक Future<T2, E2> लौटाता है, तो Future<T2, E2> में अंतर्निहित Future-unwrapping होता है [SWS_CORE_00331]।
  • यदि func एक Result<T2, E2> लौटाता है, तो Future<T2, E2> में अंतर्निहित Result-unwrapping होता है [SWS_CORE_00331]।
  • अन्य सभी मामलों में, रिटर्न प्रकार Future<U, E> [SWS_CORE_00331] होता है।

func का निष्पादन then के कॉल के संदर्भ में सिंक्रोनस रूप से, Promise::set_result या Promise::SetError के संदर्भ में, या किसी अन्य संदर्भ में हो सकता है [SWS_CORE_00331]। कॉल को नॉन-थ्रेड-सुरक्षित के रूप में निर्दिष्ट किया गया है। कंटीन्यूएशन लौटाए गए Future में पंजीकृत होता है; इसके डिस्ट्रक्टर की वापसी के बाद, कोई और कंटीन्यूएशन निष्पादित नहीं किया जा सकता है, जबकि पहले से चल रहा निष्पादन अंत तक चलता है [SWS_CORE_00331]।

मानकीकृत त्रुटि कोड मौजूद नहीं हैं [SWS_CORE_00331]। उपयोगकर्ताओं द्वारा त्रुटियों को पकड़ा जाना चाहिए और लौटाए गए Result या Future में त्रुटि कोड के रूप में आगे पास किया जाना चाहिए, क्योंकि अपवादों को कंटीन्यूएशन से बाहर जाने की अनुमति नहीं है। अमान्य Future पर एक कॉल FutureInvalidViolation को ट्रिगर करता है; यदि कंटीन्यूएशन एक अपवाद फेंकता है, तो इसका परिणाम FutureContinuationHasThrownViolation [SWS_CORE_00331] होता है।

स्पष्ट निष्पादन संदर्भ में निष्पादन के लिए, एक्ज़ीक्यूटर के साथ ओवरलोड उपलब्ध है [SWS_CORE_00337], जबकि बिना रिटर्न मान वाले संचालन के लिए Void-विशेषज्ञता लागू होती है [SWS_CORE_06231]।

यह उपयोग नोट AUTOSAR Adaptive R25-11 विनिर्देश के आधार पर एक AI द्वारा जनरेट किया गया था।

Header-Datei#include "ara/core/future.h"
Scopeclass ara::core::Future
Exception-Sicherheitexception safe
Thread-Sicherheitnot thread-safe
Verletzungen (Violations)FutureInvalidVio- If the Future is invalid ( valid ==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.
Hinweise: 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. Exceptions can be used within the continuation, however if they do not realize a Violation, they must not escape the continuation.

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

Record
AUTOSAR/AP/record/SWS_CORE_00331
Status
valid/unmigrated
Version
AUTOSAR/AP/record/SWS_CORE_00331@rel:R25-11#e79be544
Content hash
e79be544
Source
https://www.autosar.org/fileadmin/standards/R25-11/AP/AUTOSAR_AP_SWS_Core.pdf#nameddest=SWS_CORE_00331
Status: valid/unmigrated Version: rel:R25-11#7ccfcd36 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_00331@rel:R25-11#7ccfcd36
Point-in-Time History:
Recorded Revisions (8):
  • R25-11rel:R25-11#07a6189e2026-09-30
  • R19-11rel:R19-11#ab04e9222026-10-14
  • R20-11rel:R20-11#99557d6e2026-10-14
  • R21-11rel:R21-11#3a933d6a2026-10-14
  • R22-11rel:R22-11#008dba362026-10-14
  • R23-11rel:R23-11#4907cfa12026-10-14
  • R24-11rel:R24-11#2eae23502026-10-14
  • R25-11rel:R25-11#7ccfcd362026-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_00337] 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<T,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<T,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 · तापमान: नियंत्रित नहीं किया जा सकता · प्रॉम्प्ट: b5ca6c97ece5 उद्गम
जर्मन मार्गदर्शिका से अनूदितgemini-3.8-flash-low · 2026-10-13 · जर्मन मूल

उपयोग और सिमेंटिक्स

मेथड then एक Continuation (func) पंजीकृत करता है, जो वर्तमान Future इंस्टेंस का परिणाम उपलब्ध होते ही पास किए गए executor के संदर्भ में एसिंक्रोनस रूप से निष्पादित होती है [SWS_CORE_00337]। कॉल करने योग्य इकाई इंस्टेंस के परिणाम को प्रकार Result<T,E> के Rvalue एक्सप्रेशन के रूप में स्वीकार करती है [SWS_CORE_00337]। रिटर्न प्रकार Continuation के रिटर्न प्रकार U पर निर्भर करता है:

  • यदि Continuation एक Future<T2,E2> लौटाती है, तो Future<T2,E2> में एक अंतर्निहित अनपैकिंग होती है [SWS_CORE_00337]।
  • यदि Continuation एक Result<T2,E2> लौटाती है, तो इसे भी अंतर्निहित रूप से Future<T2,E2> में हल किया जाता है [SWS_CORE_00337]।
  • अन्य सभी मामलों में कॉल Future<U,E> प्रदान करती है [SWS_CORE_00337]।

समवर्तीता और जीवनचक्र

मेथड कॉल की वापसी के तुरंत बाद मूल Future इंस्टेंस अमान्य हो जाता है (valid() == false) [SWS_CORE_00337]। फ़ंक्शन को थ्रेड-सुरक्षित नहीं घोषित किया गया है [SWS_CORE_00337]। पंजीकृत Continuations नए लौटाए गए Future में प्रबंधित की जाती हैं। इसके डिस्ट्रक्टर की समाप्ति के बाद कोई और Continuation शुरू नहीं की जा सकती; पहले से चल रहा निष्पादन पूरा किया जाता है, जिससे डिस्ट्रक्टर ब्लॉक हो सकता है [SWS_CORE_00337]।

त्रुटि प्रबंधन और परस्पर क्रिया

मानकीकृत त्रुटि कोड परिभाषित नहीं हैं [SWS_CORE_00337]। किसी अमान्य इंस्टेंस पर कॉल उल्लंघन FutureInvalidViolation को ट्रिगर करता है [SWS_CORE_00337]। यदि Continuation कोई अपवाद थ्रो करती है, तो इसका परिणाम FutureContinuationHasThrownViolation में होता है; इसलिए अपवादों को पकड़ा जाना चाहिए और ara::core::Result या ara::core::Future के माध्यम से त्रुटियों के रूप में आगे भेजा जाना चाहिए [SWS_CORE_00337]। निष्पादन संदर्भ के बिना वाले ओवरलोड [SWS_CORE_00331] की तुलना में, यह संस्करण पास किए गए Executor पर निष्पादन को बाध्य करता है; void परिणाम प्रकारों के लिए अनुरूप विशेषज्ञता [SWS_CORE_06237] मौजूद है।

यह उपयोग संबंधी निर्देश AUTOSAR Adaptive R25-11 विनिर्देश पर आधारित है।

Header-Datei#include "ara/core/future.h"
Scopeclass ara::core::Future
Exception-Sicherheitexception safe
Thread-Sicherheitnot thread-safe
Verletzungen (Violations)FutureInvalidVio- If the Future is invalid ( valid ==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 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_00337
Status
valid/unmigrated
Version
AUTOSAR/AP/record/SWS_CORE_00337@rel:R25-11#8932e05c
Content hash
8932e05c
Source
https://www.autosar.org/fileadmin/standards/R25-11/AP/AUTOSAR_AP_SWS_Core.pdf#nameddest=SWS_CORE_00337
Status: valid/unmigrated Version: rel:R25-11#749fe9dc 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_00337@rel:R25-11#749fe9dc
Point-in-Time History:
Recorded Revisions (7):
  • R25-11rel:R25-11#1e610dd32026-09-30
  • R20-11rel:R20-11#12659cf92026-10-14
  • R21-11rel:R21-11#ecfba0d52026-10-14
  • R22-11rel:R22-11#d94fa7762026-10-14
  • R23-11rel:R23-11#8b664ec92026-10-14
  • R24-11rel:R24-11#853472252026-10-14
  • R25-11rel:R25-11#749fe9dc2026-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_00327] 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 · तापमान: नियंत्रित नहीं किया जा सकता · प्रॉम्प्ट: 0fe78ab97a32 उद्गम
जर्मन मार्गदर्शिका से अनूदितgemini-3.8-flash-low · 2026-10-13 · जर्मन मूल

तुल्यकालिक (synchronous) क्वेरी फ़ंक्शन valid() बिना किसी पैरामीटर के यह जाँचता है कि क्या ara::core::Future का कोई इंस्टेंस साझा स्थिति (Shared State) रखता है और इस प्रकार उपयोग योग्य है [SWS_CORE_00327]। यदि ऑब्जेक्ट उपयोग के लिए तैयार है, तो यह true लौटाता है, और यदि कोई साझा स्थिति मौजूद नहीं है, तो false लौटाता है [SWS_CORE_00327]। यह व्यवहार मानक फ़ंक्शन std::future::valid के अनुरूप है और टेम्पलेट विशिष्टता (template specialization) ara::core::Future<void, E> पर भी समान रूप से लागू होता है [SWS_CORE_06227]।

फ़ंक्शन को noexcept के रूप में घोषित किया गया है, इसे अपवाद-सुरक्षित (exception safe) माना जाता है और स्पष्ट रूप से थ्रेड-सुरक्षित (thread-safe) के रूप में निर्दिष्ट किया गया है [SWS_CORE_00327]। यह स्वयं कोई एरर कोड या अपवाद ट्रिगर नहीं करता है और इसलिए स्थिति की जाँच के लिए सुरक्षित रूप से इसका उपयोग किया जा सकता है [SWS_CORE_00327]।

Future के अन्य मेथडों के साथ संयोजन में, वैधता जाँच महत्वपूर्ण होती है, क्योंकि कॉलिंग ऑपरेशन जैसे wait() [SWS_CORE_00328] या is_ready() [SWS_CORE_00332] अमान्य स्थिति (valid() == false) होने पर FutureInvalidViolation ट्रिगर करते हैं। पहले से मान्य Future स्वतः ही अमान्य हो जाता है, जैसे ही इसका परिणाम get() [SWS_CORE_00326] या GetResult() [SWS_CORE_00336] के माध्यम से उपभोग कर लिया जाता है या then() [SWS_CORE_00331], [SWS_CORE_00337] के माध्यम से आगे की प्रोसेसिंग पंजीकृत हो जाती है।

यह पाठ एक AI द्वारा तैयार किया गया है और केवल मार्गदर्शन के लिए है। केवल लिंक किए गए AUTOSAR विनिर्देश ही बाध्यकारी हैं।

इम्प्लीमेंटर गाइड जल्द आएगी (जटिलता I1)

Header-Datei#include "ara/core/future.h"
Scopeclass ara::core::Future
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_00327
Status
valid/unmigrated
Version
AUTOSAR/AP/record/SWS_CORE_00327@rel:R25-11#6c3b9003
Content hash
6c3b9003
Source
https://www.autosar.org/fileadmin/standards/R25-11/AP/AUTOSAR_AP_SWS_Core.pdf#nameddest=SWS_CORE_00327
Status: valid/unmigrated Version: rel:R25-11#67ea8cce 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_00327@rel:R25-11#67ea8cce
Point-in-Time History:
Recorded Revisions (8):
  • R25-11rel:R25-11#d314fbc32026-09-30
  • R19-11rel:R19-11#80d78b532026-10-14
  • R20-11rel:R20-11#b7f4e1552026-10-14
  • R21-11rel:R21-11#688e791c2026-10-14
  • R22-11rel:R22-11#4e92dc072026-10-14
  • R23-11rel:R23-11#91718d0e2026-10-14
  • R24-11rel:R24-11#1c24bacf2026-10-14
  • R25-11rel:R25-11#67ea8cce2026-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_00328] 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 · तापमान: नियंत्रित नहीं किया जा सकता · प्रॉम्प्ट: 9635b0074677 उद्गम
जर्मन मार्गदर्शिका से अनूदितgemini-3.8-flash-low · 2026-10-13 · जर्मन मूल

क्लास ara::core::Future का मेम्बर फ़ंक्शन wait कॉलिंग थ्रेड को सिंक्रोनस रूप से तब तक ब्लॉक करता है जब तक कि एसिंक्रोनस ऑपरेशन से कोई परिणाम मान या कोई त्रुटि उपलब्ध न हो जाए [SWS_CORE_00328]। फ़ंक्शन कोई पैरामीटर नहीं लेता है, कोई रिटर्न मान नहीं देता है और विनिर्देश के अनुसार std::future [SWS_CORE_00328] के संबंधित फ़ंक्शन के अनुरूप व्यवहार करता है। यही व्यवहार टेम्प्लेट विशेषज्ञता ara::core::Future<void, E> [SWS_CORE_06228] पर लागू होता है।

त्रुटि प्रबंधन और समवर्तीता के संबंध में निम्नलिखित आवश्यकताएं परिभाषित हैं:

  • त्रुटि शर्त: यदि फ्यूचर ऑब्जेक्ट अमान्य है (valid == FALSE), तो एक FutureInvalidViolation मौजूद है [SWS_CORE_00328], [SWS_CORE_06228]। फिर भी, फ़ंक्शन को noexcept घोषित किया गया है और अपवाद-सुरक्षित (exception safe) के रूप में वर्गीकृत किया गया है [SWS_CORE_00328]।
  • थ्रेड-सुरक्षा: कॉल को स्पष्ट रूप से not thread-safe के रूप में वर्गीकृत किया गया है [SWS_CORE_00328]। बाहरी सिंक्रोनाइज़ेशन के बिना एक ही फ्यूचर ऑब्जेक्ट पर समवर्ती पहुंच अस्वीकार्य है।

संबंधित इंटरफ़ेस के साथ परस्पर क्रिया में, कॉल करने से पहले is_ready [SWS_CORE_00332], [SWS_CORE_06232] का उपयोग करके जांच करने की अनुशंसा की जाती है: यदि यह true लौटाता है, तो wait का कॉल गारंटीकृत रूप से अब ब्लॉक नहीं होगा। यदि असीमित प्रतीक्षा के बजाय समय-सीमित ब्लॉकिंग प्रक्रिया की आवश्यकता होती है, तो वैकल्पिक रूप से सापेक्ष समय अवधि [SWS_CORE_00329], [SWS_CORE_06229] के साथ wait_for और एक पूर्ण समय बिंदु [SWS_CORE_00330], [SWS_CORE_06230] के साथ wait_until उपलब्ध हैं।

यह उपयोग निर्देश AUTOSAR Adaptive R25-11 विनिर्देश के आधार पर स्वचालित रूप से तैयार किया गया था।

Header-Datei#include "ara/core/future.h"
Scopeclass ara::core::Future
Exception-Sicherheitexception safe
Thread-Sicherheitnot thread-safe
Verletzungen (Violations)FutureInvalidVio- If the Future is invalid ( valid ==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_00328
Status
valid/unmigrated
Version
AUTOSAR/AP/record/SWS_CORE_00328@rel:R25-11#26ee6c00
Content hash
26ee6c00
Source
https://www.autosar.org/fileadmin/standards/R25-11/AP/AUTOSAR_AP_SWS_Core.pdf#nameddest=SWS_CORE_00328
Status: valid/unmigrated Version: rel:R25-11#7d1caea0 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_00328@rel:R25-11#7d1caea0
Point-in-Time History:
Recorded Revisions (8):
  • R25-11rel:R25-11#71020ccc2026-09-30
  • R19-11rel:R19-11#1457e28d2026-10-14
  • R20-11rel:R20-11#7259d3062026-10-14
  • R21-11rel:R21-11#82e85c2e2026-10-14
  • R22-11rel:R22-11#63ca481a2026-10-14
  • R23-11rel:R23-11#7b23f9cb2026-10-14
  • R24-11rel:R24-11#4301d6592026-10-14
  • R25-11rel:R25-11#7d1caea02026-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_00329] Upstream: RS_AP_00130

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

Wait for the timeoutDuration 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 · तापमान: नियंत्रित नहीं किया जा सकता · प्रॉम्प्ट: 360b2640b7ed उद्गम खुले प्रश्न (1)
जर्मन मार्गदर्शिका से अनूदितgemini-3.8-flash-low · 2026-10-13 · जर्मन मूल

उपयोग

क्लास ara::core::Future का सदस्य फ़ंक्शन wait_for कॉलिंग थ्रेड को अधिकतम पास की गई समयावधि timeoutDuration के लिए या साझा स्थिति (shared state) में परिणाम मान अथवा त्रुटि उपलब्ध होने तक ब्लॉक करता है [SWS_CORE_00329]। इसका व्यवहार std::future [SWS_CORE_00329] के संगत फ़ंक्शन के अनुरूप है। वापसी मान के रूप में, यह FutureStatus लौटाता है [SWS_CORE_00329], जो इंगित करता है कि साझा स्थिति उपलब्ध है (kReady) या निर्दिष्ट प्रतीक्षा समय समाप्त हो गया है (kTimeout) [SWS_CORE_00361]।

त्रुटि प्रबंधन और सीमा शर्तें

फ़ंक्शन को noexcept के रूप में घोषित किया गया है और अपवाद-सुरक्षित (exception safe) निर्दिष्ट किया गया है [SWS_CORE_00329]। यदि Future-ऑब्जेक्ट अमान्य है (valid == FALSE), तो FutureInvalidViolation के रूप में एक उल्लंघन होता है [SWS_CORE_00329]। Interpretation: चूंकि किसी भी C++ अपवाद को फेंकने की अनुमति नहीं है, इसलिए प्लेटफ़ॉर्म स्तर पर ऐसे उल्लंघन को एक घातक रनटाइम त्रुटि माना जा सकता है। प्रश्न Q-2f22a07f6e143856 (खुला)

समवर्तीता और परस्पर क्रिया

ऑपरेशन को not thread-safe के रूप में वर्गीकृत किया गया है [SWS_CORE_00329]; इसलिए उसी इंस्टेंस पर समवर्ती एक्सेस के लिए बाहरी सिंक्रोनाइज़ेशन की आवश्यकता होती है। शब्दार्थ (semantics) और हस्ताक्षर टेम्प्लेट विशेषज्ञता ara::core::Future<void, E> [SWS_CORE_06229] के लिए समान रूप से लागू होते हैं। std::future_status के विपरीत, गणना प्रकार FutureStatus में deferred [SWS_CORE_00361] के लिए कोई प्रविष्टि मौजूद नहीं है।

यह पाठ AUTOSAR विनिर्देश R25-11 के आधार पर एक AI द्वारा जनरेट किया गया था।

इम्प्लीमेंटर गाइड जल्द आएगी (जटिलता I1)

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

Parameter (in)

ParameterBeschreibung
timeoutDurationmaximal duration to wait for

Rückgabewert

TypBeschreibung
FutureStatusStatus that indicates whether the timeoutDuration expired 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_00329
Status
valid/unmigrated
Version
AUTOSAR/AP/record/SWS_CORE_00329@rel:R25-11#53e7fee4
Content hash
53e7fee4
Source
https://www.autosar.org/fileadmin/standards/R25-11/AP/AUTOSAR_AP_SWS_Core.pdf#nameddest=SWS_CORE_00329
Status: valid/unmigrated Version: rel:R25-11#bb164066 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_00329@rel:R25-11#bb164066
Point-in-Time History:
Recorded Revisions (8):
  • R25-11rel:R25-11#669e52732026-09-30
  • R19-11rel:R19-11#34429cdd2026-10-14
  • R20-11rel:R20-11#6e3fcfd92026-10-14
  • R21-11rel:R21-11#6e3fcfd92026-10-14
  • R22-11rel:R22-11#4c259d672026-10-14
  • R23-11rel:R23-11#ec6d12432026-10-14
  • R24-11rel:R24-11#adb812622026-10-14
  • R25-11rel:R25-11#bb1640662026-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_00330] 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 deadline 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 · तापमान: नियंत्रित नहीं किया जा सकता · प्रॉम्प्ट: b4703e774b3e उद्गम
जर्मन मार्गदर्शिका से अनूदितgemini-3.8-flash-low · 2026-10-13 · जर्मन मूल

सदस्य फ़ंक्शन wait_until कॉलिंग थ्रेड को तब तक ब्लॉक करता है जब तक कि निर्दिष्ट पूर्ण समय बिंदु (absolute time point) deadline नहीं आ जाता या ara::core::Future कोई परिणाम अथवा त्रुटि प्रदान नहीं कर देता [SWS_CORE_00330]। यह व्यवहार std::future [SWS_CORE_00330] के संगत फ़ंक्शन पर आधारित है।

वापसी मान के रूप में, फ़ंक्शन FutureStatus लौटाता है [SWS_CORE_00330]। यह enum प्रकार स्थिति kReady के माध्यम से संकेत देता है कि साझा स्थिति तैयार है (मान या त्रुटि उपलब्ध है), या kTimeout के माध्यम से कि परिणाम के बिना समय सीमा समाप्त हो गई है [SWS_CORE_00361]। std::future_status::deferred के अनुरूप कोई स्थिति FutureStatus में मौजूद नहीं है [SWS_CORE_00361]।

त्रुटि प्रबंधन और अपवाद-सुरक्षा के संबंध में, फ़ंक्शन को अपवाद-सुरक्षित (exception safe) और noexcept के रूप में निर्दिष्ट किया गया है [SWS_CORE_00330]। हालाँकि, यदि फ़ंक्शन को किसी अमान्य इंस्टेंस पर कॉल किया जाता है (valid == FALSE), तो FutureInvalidViolation के रूप में उल्लंघन होता है [SWS_CORE_00330]।

समवर्तीता के संबंध में, wait_until को थ्रेड-सुरक्षित नहीं (not thread-safe) के रूप में वर्गीकृत किया गया है [SWS_CORE_00330]। उसी ara::core::Future-ऑब्जेक्ट पर समानांतर एक्सेस को इसलिए बाह्य रूप से सिंक्रोनाइज़ किया जाना चाहिए। वही सिमेंटिक्स और सिग्नेचर विशेषज्ञता ara::core::Future<void, E> [SWS_CORE_06230] पर लागू होते हैं।

यह पाठ AI द्वारा तैयार किया गया था और मार्गदर्शन के रूप में कार्य करता है। विनिर्देश ही प्रामाणिक है।

इम्प्लीमेंटर गाइड जल्द आएगी (जटिलता I1)

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

Parameter (in)

ParameterBeschreibung
deadlinelatest point in time to wait

Rückgabewert

TypBeschreibung
FutureStatusstatus that indicates whether the deadline 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_00330
Status
valid/unmigrated
Version
AUTOSAR/AP/record/SWS_CORE_00330@rel:R25-11#57c8616c
Content hash
57c8616c
Source
https://www.autosar.org/fileadmin/standards/R25-11/AP/AUTOSAR_AP_SWS_Core.pdf#nameddest=SWS_CORE_00330
Status: valid/unmigrated Version: rel:R25-11#00db6175 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_00330@rel:R25-11#00db6175
Point-in-Time History:
Recorded Revisions (8):
  • R25-11rel:R25-11#f662b2c42026-09-30
  • R19-11rel:R19-11#a84101962026-10-14
  • R20-11rel:R20-11#4f8fd4042026-10-14
  • R21-11rel:R21-11#0fe1ad9c2026-10-14
  • R22-11rel:R22-11#6ef3c1042026-10-14
  • R23-11rel:R23-11#872aa1602026-10-14
  • R24-11rel:R24-11#412256922026-10-14
  • R25-11rel:R25-11#00db61752026-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_00333] 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
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_00333
Status
valid/unmigrated
Version
AUTOSAR/AP/record/SWS_CORE_00333@rel:R25-11#6bc94d7d
Content hash
6bc94d7d
Source
https://www.autosar.org/fileadmin/standards/R25-11/AP/AUTOSAR_AP_SWS_Core.pdf#nameddest=SWS_CORE_00333
Status: valid/unmigrated Version: rel:R25-11#2689e3e8 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_00333@rel:R25-11#2689e3e8
Point-in-Time History:
Recorded Revisions (8):
  • R25-11rel:R25-11#16f70bc12026-09-30
  • R19-11rel:R19-11#42ac89202026-10-14
  • R20-11rel:R20-11#8f4a235f2026-10-14
  • R21-11rel:R21-11#eccb21be2026-10-14
  • R22-11rel:R22-11#58e9180f2026-10-14
  • R23-11rel:R23-11#b308517b2026-10-14
  • R24-11rel:R24-11#02a09fc62026-10-14
  • R25-11rel:R25-11#2689e3e82026-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