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

دليل المستخدممولَّد بالذكاء الاصطناعي

يتيح الاستقبال المتزامن أو غير المتزامن للقيم والأخطاء من عملية متزامنة الحدوث.
مُولَّد بالذكاء الاصطناعي غير مُراجَع النموذج: gemini-3.8-flash-medium · الجهد: medium · درجة الحرارة: غير قابل للتحكم · الموجّه: fbd974cb6be2 المصدر أسئلة مفتوحة (1)
مترجم من الدليل الألمانيgemini-3.8-flash-low · 2026-10-13 · الأصل الألماني

يتيح الاستقبال المتزامن أو غير المتزامن للقيم والأخطاء من عملية متزامنة الحدوث.

تُستخدم الفئة ara::core::Future كمقبض مستقبل لنتيجة عملية غير متزامنة وتدير الوصول إلى حالة مشتركة [SWS_CORE_00327]. يمكن للمستهلكين فحص الحالة بدون حجب، أو الانتظار بشكل متزامن حتى الاكتمال، أو تلقي النتيجة عبر GetResult() بدون استثناءات كـ ara::core::Result [SWS_CORE_00336]. نظرًا لأن عمليات النسخ محذوفة، تتم إدارة الملكية بشكل حصري، ويصبح الكائن غير صالح على الفور بعد استرداد النتيجة أو إعادة التوجيه بواسطة Continuation.

السياق

تمثل فئة القالب ara::core::Future عنصر طرف الاستقبال لنتائج العمليات غير المتزامنة داخل AUTOSAR Adaptive Platform. وهي تتيح الوصول المتحكم فيه إلى حالة مشتركة (Shared State)، يتم ملؤها بشكل غير متزامن بواسطة مثيل منتِج [SWS_CORE_00327]. من الناحية المفاهيمية، تنفذ الفئة std::future من معيار C++17 رقم ISO/IEC 14882:2017 [11]، ولكنها تتكامل بسلاسة مع مفهوم المنصة القائم على استثناءات الأخطاء: بالنسبة لمعلمة القالب E، يتم تحديد نوع الخطأ ara::core::ErrorCode إلزاميًا؛ وأي مواصفة مخالفة تؤدي إلى خطأ في الترجمة. تشمل أطراف التفاعل الأساسية المُنتِج غير المتزامن (مثل Promise مرتبط)، والذي يوفر القيمة أو الخطأ، ومثيل Future كمستقبل حصري بالإضافة إلى مستهلك أو سياق تنفيذ (ExecutorT)، تُسلَّم إليه المهام اللاحقة [SWS_CORE_00331] [SWS_CORE_00337].

دورة الحياة

يخضع إنشاء ara::core::Future وإدارة حالته وتدميره لقواعد صارمة لضمان علاقات ملكية حتمية:

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

مخطط الحالة: دورة الحياة وانتقالات الحالة لمثيل Future فيما يتعلق بالصلاحية وتوفر Shared State. المصادر: [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() أمرًا حاسمًا: تقوم الدالة بالحجب عند الحاجة، ولكنها لا تثير استثناءات أبدًا وتمرر القيمة أو الخطأ كـ ara::core::Result<T, E> بواسطة Move [SWS_CORE_00336]. توفر الدالة get() التوافق مع STL، وترمي استثناءات C++ في حالة الخطأ ولا تشارك في حل التحميل الزائد إذا تم تعطيل معالجة الاستثناءات في سلسلة الأدوات [SWS_CORE_00326].
  3. التسلسل غير المتزامن (Continuations): بدلاً من الحجب المتزامن، يمكن تسجيل رد نداء عبر then()، اختياريًا مع التعيين إلى سياق تنفيذ (Executor) [SWS_CORE_00331] [SWS_CORE_00337]. يستقبل رد النداء النتيجة كقيمة Rvalue من Result<T, E>. إذا أرجعت دالة الاستمرارية نفسها 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، يتم تحديد حالات الخطأ التالية:

  • الاستدعاء على مثيل غير صالح: يمثل استدعاء is_ready()، أو wait()، أو wait_for()، أو wait_until()، أو GetResult()، أو then() على مثيل غير صالح (valid() == false) FutureInvalidViolation [SWS_CORE_00328] [SWS_CORE_00329] [SWS_CORE_00330] [SWS_CORE_00331] [SWS_CORE_00332] [SWS_CORE_00336] [SWS_CORE_00337]. عند استدعاء get()، يتم في هذه الحالة رمي FutureException برمز الخطأ kNoState [SWS_CORE_00326].
  • الحالة المشتركة المهجورة (Broken Promise): إذا تم التخلي عن الحالة المشتركة قبل الأوان بواسطة الـ Promise المرتبط، يُرجع GetResult() كائن Result يحتوي على رمز الخطأ القياسي FutureErrc::kBrokenPromise [SWS_CORE_00336]. وعند استدعاء get()، يُطلق الاستثناء المقابل [SWS_CORE_00326].
  • الاستثناءات في دوال المتابعة: لا يجوز لأي دالة متابعة مسجلة أن تُطلق استثناءات، إلا لتنفيذ Violation. وإذا أطلقت دالة المتابعة استثناءً رغم ذلك، فإن هذا يؤدي إلى FutureContinuationHasThrownViolation [SWS_CORE_00331] [SWS_CORE_00337]. يجب التقاط الاستثناءات داخل دوال الإغلاق (Closures) وإرجاعها كحالة خطأ في صورة 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#44047c53
Content hash
44047c53
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#8c776294
Content hash
8c776294
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#aec679ef
Content hash
aec679ef
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#b3ce37ec
Content hash
b3ce37ec
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() بشكل متزامن النتيجة من النوع T من ara::core::Future [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].
  • إذا تم التخلي عن الحالة المشتركة قبل الأوان بواسطة العملية غير المتزامنة، ينتج عن ذلك الخطأ kBrokenPromise وفقًا لـ FutureErrc [SWS_CORE_00326]، [SWS_CORE_00400].
  • إذا تم الاستدعاء على مثيل غير صالح، يتم طرح FutureException مع رمز الخطأ kNoState [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#844eb059
Content hash
844eb059
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#5dcc2504
Content hash
5dcc2504
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#8c8af7fa
Content hash
8c8af7fa
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#2a2a657a
Content hash
2a2a657a
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 لربط الحسابات غير المتزامنة وتسجل كائنًا قابلاً للاستدعاء func كاستمرارية (Continuation) على مثيل من ara::core::Future [SWS_CORE_00331]. بعد عودة الاستدعاء، تصبح Future الأصلية غير صالحة (valid() == false). ويتلقى هدف الاستدعاء النتيجة التي تم الحصول عليها عبر GetResult() للمثيل ممررة كقيمة Rvalue من النوع Result<T, E> [SWS_CORE_00331].

يعتمد نوع الإرجاع لـ then على نوع الإرجاع U لـ Continuation [SWS_CORE_00331]:

  • إذا كانت func تُرجع Future<T2, E2>، يحدث فك غلاف Future ضمني إلى Future<T2, E2> [SWS_CORE_00331].
  • إذا كانت func تُرجع Result<T2, E2>، يحدث فك غلاف Result ضمني إلى Future<T2, E2> [SWS_CORE_00331].
  • في جميع الحالات الأخرى، يكون نوع الإرجاع Future<U, E> [SWS_CORE_00331].

يمكن أن يحدث تنفيذ func بشكل متزامن في سياق استدعاء then، أو في سياق Promise::set_result أو Promise::SetError، أو في سياق آخر [SWS_CORE_00331]. تم تحديد الاستدعاء على أنه غير آمن خيطيًا. يتم تسجيل Continuation في Future المُرجعة؛ وبعد عودة مدمرها، لا يجوز تنفيذ أي استمرارية أخرى، بينما يستمر التنفيذ الجاري بالفعل حتى النهاية [SWS_CORE_00331].

لا توجد رموز أخطاء قياسية [SWS_CORE_00331]. يجب على المستخدمين التقاط الأخطاء وتمريرها كرمز خطأ في Result أو Future مُرجعة، حيث لا يجوز للاستثناءات مغادرة Continuation. يؤدي الاستدعاء على Future غير صالحة إلى إطلاق FutureInvalidViolation؛ وإذا أطلقت الاستمرارية استثناءً، ينتج عن ذلك FutureContinuationHasThrownViolation [SWS_CORE_00331].

للتنفيذ في سياق تنفيذ صريح، يتوفر التحميل الزائد مع Executor [SWS_CORE_00337]، بينما ينطبق تخصيص void للعمليات التي ليس لها قيمة إرجاع [SWS_CORE_06231].

تم إنشاء ملاحظة الاستخدام هذه بواسطة ذكاء اصطناعي بناءً على مواصفة 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

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#33886ed9
Content hash
33886ed9
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 استمرارًا (func) يتم تنفيذه بشكل غير متزامن في سياق executor المُمرر بمجرد توفر نتيجة مثيل Future الحالي [SWS_CORE_00337]. تستقبل الوحدة القابلة للاستدعاء نتيجة المثيل كتعبير rvalue من النوع Result<T,E> [SWS_CORE_00337]. يعتمد نوع الإرجاع على نوع الإرجاع U الخاص بالاستمرار:

  • إذا أرجع الاستمرار Future<T2,E2>، تحدث عملية فك حزم ضمنية إلى Future<T2,E2> [SWS_CORE_00337].
  • إذا أرجع الاستمرار Result<T2,E2>، فسيتم حله ضمنيًا أيضًا إلى Future<T2,E2> [SWS_CORE_00337].
  • في جميع الحالات الأخرى، يُرجع الاستدعاء Future<U,E> [SWS_CORE_00337].

التزامن ودورة الحياة

مباشرة بعد العودة من استدعاء الدالة، يصبح مثيل Future الأصلي غير صالح (valid() == false) [SWS_CORE_00337]. تم التصريح عن الدالة بأنها غير آمنة لخيوط التنفيذ [SWS_CORE_00337]. تتم إدارة الاستمرارات المسجلة في Future المُرجع حديثًا. بعد انتهاء تنفيذ المُدمّر (destructor) الخاص به، لا يجوز بدء أي استمرار بعد ذلك؛ وسيتم إكمال أي تنفيذ قيد التشغيل بالفعل حتى النهاية، بحيث يمكن للمُدمّر أن يحظر (block) [SWS_CORE_00337].

معالجة الأخطاء والتفاعل

لم يتم تحديد رموز أخطاء قياسية [SWS_CORE_00337]. يؤدي الاستدعاء على مثيل غير صالح إلى إطلاق الانتهاك (violation) FutureInvalidViolation [SWS_CORE_00337]. إذا رمى الاستمرار استثناءً، ينتج عن ذلك FutureContinuationHasThrownViolation؛ وبالتالي يجب التقاط الاستثناءات وتمريرها كأخطاء عبر ara::core::Result أو ara::core::Future [SWS_CORE_00337]. بالمقارنة مع التحميل الزائد بدون سياق تنفيذ [SWS_CORE_00331]، يفرض هذا المتغير التنفيذ على المنفّذ المُمرر؛ وتوجد التخصصية المماثلة [SWS_CORE_06237] لأنواع نتائج void.

تستند ملاحظة الاستخدام هذه إلى مواصفة 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#cdaab5c1
Content hash
cdaab5c1
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 · الأصل الألماني

تتحقق دالة الاستعلام المتزامنة valid() بدون معلمات مما إذا كانت نسخة من ara::core::Future تمتلك حالة مشتركة (Shared State) وبالتالي تكون قابلة للاستخدام [SWS_CORE_00327]. وتُرجع true إذا كان الكائن جاهزًا للاستخدام، وfalse إذا لم تكن هناك حالة مشتركة [SWS_CORE_00327]. ويتطابق السلوك مع الدالة القياسية std::future::valid وينطبق بنفس الطريقة على تخصيص القالب 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] تطلق FutureInvalidViolation في حال كانت الحالة غير صالحة (valid() == false). ويصبح Future الصالح سابقًا غير صالح تلقائيًا بمجرد استهلاك نتيجته عبر get() [SWS_CORE_00326] أو GetResult() [SWS_CORE_00336] أو عند تسجيل معالجة لاحقة عبر then() [SWS_CORE_00331]، [SWS_CORE_00337].

تم إنشاء هذا النص بواسطة ذكاء اصطناعي ويُستخدم كدليل توجيهي. وتُعتبر مواصفات 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#e84b7948
Content hash
e84b7948
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 · الأصل الألماني

تحظر دالة العضو wait من الفئة ara::core::Future خيط الاستدعاء بشكل متزامن حتى تتوفر قيمة النتيجة أو خطأ من العملية غير المتزامنة [SWS_CORE_00328]. لا تقبل الدالة أي معاملات، ولا تُرجع أي قيمة، وتتصرف وفقًا للمواصفة بشكل مماثل للدالة المقابلة من std::future [SWS_CORE_00328]. ينطبق السلوك نفسه على تخصص القالب (template specialization) ara::core::Future<void, E> [SWS_CORE_06228].

فيما يتعلق بمعالجة الأخطاء والتزامن، تم تحديد المتطلبات التالية:

  • شرط الخطأ: إذا كان كائن Future غير صالح (valid == FALSE)، فيوجد FutureInvalidViolation [SWS_CORE_00328]، [SWS_CORE_06228]. ومع ذلك، تم التصريح عن الدالة بأنها noexcept وتصنيفها على أنها آمنة من الاستثناءات (exception safe) [SWS_CORE_00328].
  • الأمان الخيطي: تم تصنيف الاستدعاء صراحة على أنه not thread-safe [SWS_CORE_00328]. الوصول المتزامن إلى نفس كائن Future دون مزامنة خارجية غير مسموح به.

في إطار التفاعل مع الواجهات ذات الصلة، يوصى قبل الاستدعاء بإجراء فحص بواسطة is_ready [SWS_CORE_00332]، [SWS_CORE_06232]: إذا أرجعت هذه true، فإن استدعاء wait يضمن عدم الحظر بعد الآن. إذا كان المطلوب بدلاً من الانتظار غير المحدود عملية حظر محدودة بوقت، يتوفر كبديل wait_for مع مدة زمنية نسبية [SWS_CORE_00329]، [SWS_CORE_06229] بالإضافة إلى wait_until مع نقطة زمنية مطلقة [SWS_CORE_00330]، [SWS_CORE_06230].

تم إنشاء ملاحظة الاستخدام هذه آليًا استنادًا إلى مواصفة 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#14de0289
Content hash
14de0289
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 · الأصل الألماني

الاستخدام

تحظر دالة العضو wait_for للفئة ara::core::Future الخيط المستدعي لمدة أقصاها الفترة الزمنية الممررة timeoutDuration أو حتى تتوفر قيمة نتيجة أو خطأ في الحالة المشتركة [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]. تفسير: نظرًا لعدم السماح برمي استثناءات C++‎، يُفترض أن يتم التعامل مع مثل هذا الانتهاك من جانب المنصة كخطأ فادح في وقت التشغيل. سؤال Q-2f22a07f6e143856 (مفتوح)

التزامن والتفاعل

تم تصنيف العملية على أنها not thread-safe [SWS_CORE_00329]؛ وبالتالي فإن عمليات الوصول المتزامنة إلى نفس المثيل تتطلب مزامنة خارجية. تنطبق الدلالات وبنية التوقيع بشكل متطابق على تخصيص القالب ara::core::Future<void, E> [SWS_CORE_06229]. وخلافًا لـ std::future_status، لا يوجد إدخال لـ deferred في نوع التعداد FutureStatus [SWS_CORE_00361].

تم إنشاء هذا النص بواسطة ذكاء اصطناعي استنادًا إلى مواصفة AUTOSAR R25-11.

دليل المنفِّذ قيد الإعداد (التعقيد 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#b8e858d0
Content hash
b8e858d0
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 الخيط المستدعي حتى يتم الوصول إلى النقطة الزمنية المطلقة المحددة deadline أو حتى يوفر ara::core::Future نتيجة أو خطأ [SWS_CORE_00330]. ويعتمد السلوك على الدالة المقابلة لـ std::future [SWS_CORE_00330].

تُرجع الدالة كقيمة إرجاع FutureStatus [SWS_CORE_00330]. يشير نوع التعداد هذا عبر الحالة 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].

تم إنشاء هذا النص بواسطة ذكاء اصطناعي وهو بمثابة دليل توجيهي. المرجع الأساسي هو المواصفة.

دليل المنفِّذ قيد الإعداد (التعقيد 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#e55199d8
Content hash
e55199d8
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#91b10907
Content hash
91b10907
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