DEENESPTFRRUARHIKOZHNL

فئة ara::core::Future< void, E >

[SWS_CORE_06221] Upstream: RS_AP_00130

template <typename E> class Future< void, E > final {...};

Specialization of class Future for "void" values. The implementation shall flag the condition: ( E != ara::core::ErrorCode ) as a compile error.

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

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

يتيح الانتظار حتى اكتمال عملية غير متزامنة بدون قيمة معادة، بالإضافة إلى استخراج حالة الخطأ.
مُولَّد بالذكاء الاصطناعي غير مُراجَع النموذج: gemini-3.8-flash-medium · الجهد: medium · درجة الحرارة: غير قابل للتحكم · الموجّه: e943c154e07e المصدر
مترجم من الدليل الألمانيgemini-3.8-flash-low · 2026-10-13 · الأصل الألماني

يتيح الانتظار حتى اكتمال عملية غير متزامنة بدون قيمة معادة، بالإضافة إلى استخراج حالة الخطأ.

تتيح الفئة ara::core::Future<void, E> المزامنة غير المتزامنة والتحقق من الأخطاء للعمليات التي لا تتضمن قيمة معادة في AUTOSAR Adaptive [SWS_CORE_06236]. وباعتبارها نوعًا غير قابل للنسخ، فإنها تتيح الانتظار حتى الاكتمال، بالإضافة إلى استرداد النتيجة الآمن ضد الاستثناءات كـ ara::core::Result<void, E> [SWS_CORE_06236] أو مواصلة المعالجة غير المتزامنة عبر دالة استمرار [SWS_CORE_06231]. بعد استخراج النتيجة، يتم إبطال الحالة المشتركة، بحيث تشكل الاستدعاءات اللاحقة دون حالة صالحة انتهاكًا [SWS_CORE_06236].

السياق

يمثل تخصيص فئة القالب ara::core::Future<void, E> طرف الاستقبال لعملية غير متزامنة في AUTOSAR Adaptive، والتي لا تعيد قيمة عند الاكتمال الناجح، بل تشير فقط إلى وقوع الحدث أو حدوث خطأ. ووفقًا لوصف الفئة، يجب على التنفيذ إنهاء الشرط E != ara::core::ErrorCode بخطأ ترجمة. تتفاعل الفئة عادةً مع ara::core::Promise مطابق يملأ الحالة المشتركة (Shared State) [SWS_CORE_06236]، وكذلك مع سياقات تنفيذ غير متزامنة عند تسجيل دوال الاستمرار [SWS_CORE_06237].

دورة الحياة

مثيلات ara::core::Future<void, E> هي كائنات ذات دلالات نقل بحتة: حيث تم حذف منشئ النسخ [SWS_CORE_06234] وعامل تشغيل التعيين بالنسخ [SWS_CORE_06235] (delete). والكائن الذي يتم إنشاؤه عبر المنشئ الافتراضي لا يمتلك حالة مشتركة ويتصرف بشكل مماثل لـ std::future [SWS_CORE_06222]. ومن خلال الإنشاء بالنقل [SWS_CORE_06223] أو التعيين بالنقل [SWS_CORE_06225]، يتولى مثيل ما ملكية Shared State من مثيل آخر.

تتشكل دورة الحياة بشكل أساسي من خلال وضع Shared State. وعبر الطريقة valid()، يمكن التحقق مما إذا كان المثيل مرتبطًا بـ Shared State وبالتالي قابلاً للاستخدام [SWS_CORE_06227]. وبمجرد استرداد النتيجة بواسطة GetResult() [SWS_CORE_06236] أو get() [SWS_CORE_06226] أو تسجيل استمرار عبر then() [SWS_CORE_06231]، يفقد كائن Future حالته المشتركة ويعيد valid() القيمة false. ويحرر المدمر أي حالة مشتركة متبقية [SWS_CORE_06233]. وفيما يتعلق بالتزامن، فإن عمليات الفحص والتدمير مثل valid() [SWS_CORE_06227] وis_ready() [SWS_CORE_06232] والمدمر [SWS_CORE_06233] آمنة بالنسبة للخيوط (thread-safe)، في حين أن العمليات المعدلة للحالة مثل GetResult() [SWS_CORE_06236] وget() [SWS_CORE_06226] ودوال الانتظار [SWS_CORE_06228] ليست آمنة بالنسبة للخيوط.

future_states Ungueltig غير صالح (valid() == false) Ausstehend صالح / قيد الانتظار (valid() == true, is_ready() == false) Ungueltig->Ausstehend Move-Konstruktion / Zuweisung Ausstehend->Ungueltig then() Bereit صالح / جاهز (valid() == true, is_ready() == true) Ausstehend->Bereit Promise setzt Wert / Fehler Bereit->Ungueltig GetResult() / get() Bereit->Ungueltig then()

مخطط الحالة: انتقالات الحالة وصلاحية <ara::core::Future<void, E. المصادر: [SWS_CORE_06222]، [SWS_CORE_06226]، [SWS_CORE_06227]، [SWS_CORE_06231]، [SWS_CORE_06232]، [SWS_CORE_06233]، [SWS_CORE_06236]

مسار الاستخدام

في مسار الاستخدام المتزامن، ينتظر المستهلك اكتمال العملية غير المتزامنة. وباستخدام is_ready()، يمكن الاستعلام بحد أدنى من الحظر عما إذا كانت هناك قيمة أو خطأ [SWS_CORE_06232]. وبدلاً من ذلك، يمكن الانتظار بشكل حظري بواسطة wait() [SWS_CORE_06228]، أو لفترة زمنية محددة عبر wait_for() [SWS_CORE_06229] وwait_until() [SWS_CORE_06230]. وإذا كانت النتيجة متاحة، يتم الاستعلام عن القيمة ويفضل أن يكون ذلك بأسلوب آمن ضد الاستثناءات عبر GetResult()، وبذلك يُعاد ara::core::Result<void, E> [SWS_CORE_06236].

في المسار غير المتزامن، تتيح الطريقة then() تسجيل دالة استمرار (Continuation) يتم تنفيذها بمجرد توفر النتيجة [SWS_CORE_06231]. وهنا يمكن اختياريًا تمرير سياق تنفيذ (Executor) [SWS_CORE_06237]. وتستقبل دالة الاستمرار Result<void, E> كـ Rvalue. يقوم نوع الإرجاع لـ then() بفك أنواع Future أو Result المتداخلة تلقائيًا (Unwrapping) [SWS_CORE_06231].

الاسترداد المتزامن للنتيجة عبر GetResultالتطبيقFutureSharedStatevalid()trueis_ready()فحص الحالةtrue (النتيجة أو الخطأ جاهز)trueGetResult()std::move(Ergebnis)Result<void, E>تعيين الحالة المشتركة إلى غير صالحة (valid() == false)Result<void, E>

مخطط التتابع: التسلسل المتزامن للاستعلام عن النتيجة عبر GetResult. المصادر: [SWS_CORE_06227]، [SWS_CORE_06228]، [SWS_CORE_06232]، [SWS_CORE_06236]

سيناريوهات الأخطاء

إذا تم استدعاء عملية معتمدة على الحالة (مثل GetResult() أو is_ready() أو wait() أو wait_for() أو wait_until() أو then()) على مثيل غير صالح (valid() == false)، فإن ذلك يعد انتهاكًا للشرط المسبق ويُعامل كـ FutureInvalidViolation [SWS_CORE_06228]، [SWS_CORE_06229]، [SWS_CORE_06230]، [SWS_CORE_06231]، [SWS_CORE_06232]، [SWS_CORE_06236]، [SWS_CORE_06237]. وعند استدعاء get() على مثيل غير صالح، يتم بدلاً من ذلك إطلاق FutureException برمز الخطأ kNoState [SWS_CORE_06226]؛ ولا يشارك get() في حل التحميل الزائد (Overload Resolution) عند تعطيل استثناءات ++C [SWS_CORE_06226].

إذا تم تدمير الـ Promise المقابل أو غادر الحالة المشتركة دون تعيين نتيجة أو خطأ صريح، يتم إيداع رمز الخطأ FutureErrc::kBrokenPromise وفقًا لـ [SWS_CORE_00400] في Shared State [SWS_CORE_06226]، [SWS_CORE_06236]. ويتم إرجاع هذا الرمز بواسطة GetResult() كخطأ في Result<void, E> [SWS_CORE_06236]. وإذا أطلقت دالة استمرار مسجلة في then() استثناءً لا ينفذ انتهاكًا، فإن هذا يؤدي إلى FutureContinuationHasThrownViolation [SWS_CORE_06231]، [SWS_CORE_06237].

يستند هذا الدليل حصريًا إلى مواصفة AUTOSAR لـ <ara::core::Future<void, E في الإصدار R25-11.

خريطة الأعضاء

المُنشئات والمُتلف

2

المعاملات

1

مخطط الفئة

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

G nara__core__Future__void__E__740 Future< void, E > + Future() + operator=() + ~Future() + GetResult() + get() + is_ready() + then() + valid() + wait() + wait_for() + wait_until()

عرض التفاصيل

اختر عنصرًا من المخطط.

المُنشئات والمُتلف

Future دالة 3

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

التحميلات الزائدة Future 3
Future () noexcept; SWS_CORE_06222
Future (Future &&other) noexcept; SWS_CORE_06223
Future (const Future &other)=delete; SWS_CORE_06234
~Future دالة

Destructor for Future objects. Abandons any shared state

~Future () noexcept;

الدوال الأعضاء

get دالة

Returns nothing. This function shall behave the same as the corresponding std::future function. Part of the behavior taken from the std::future is that after a call to this function the Future is not valid anymore (valid() == false). ≙ std::future

void get () noexcept(false);
GetResult دالة

Get the result. Similar to Future::get(), this call blocks until the value or an error is available. However, this call will never throw an exception. Part of the behavior taken from Future::get() is that after a call to this function the Future is not valid anymore (valid() == false).

Result< void, E > GetResult () noexcept(std::is_nothrow_move_ constructible< E >::value);
is_ready دالة

Return whether the asynchronous operation has finished. If this function returns true, get(), Get Result() and the wait calls are guaranteed not to block.

bool is_ready () const noexcept;
then دالة 2

Create a new Future with the content returned by func when passed the Result of this Future. func may be called in the context of this call or in the context of Promise::set_value() or Promise::SetError() or somewhere else. valid() == false on the original future object immediately after it returns. The Callable input argument "func" takes a Result<void,E> object as parameter. This will be the Result obtained via GetResult from the Future instance itself, on which .then() is being called. The Result is passed to func as an rvalue expression. The return type of then depends on the return type of func (aka continuation). Let U be the return type of the continuation (i.e. a type equivalent to std::invoke_result_ t<std::decay_t<F>,Result<void,E>>). • If U is Future<T2,E2> for some types T2, E2, then the return type of then() is Future<T2,E2>. This is known as implicit Future unwrapping. • If U is Result<T2,E2> for some types T2, E2, then the return type of then() is Future<T2,E2>. This is known as implicit Result unwrapping. • Otherwise it is Future<U,E>. Continuations that are registered with Future::then() are registered in the Future F that Future::then() returns. No such continuation shall be executed after the destructor of the Future F returns. A continuation that is already being executed shall run to completion. Note: that means that the destructor of Future might block until the currently running continuation has been completed. The continuation shall not throw, except for the purpose of implementing a Violation. Note: Exceptions can be used within the continuation, however if they do not realize a Violation, they must not escape the continuation. Note: Users who need to propagate information from closures’ exceptions should translate them to an error and return an ara::core::Result or ara::core::Future from the continuation with the error stored in it. ≙ std::invoke_result_

التحميلات الزائدة then 2
template <typename F> auto then (F &&func) noexcept -> Future< <see below> >; SWS_CORE_06231
template <typename F, typename ExecutorT> auto then (F &&func, ExecutorT &&executor) noexcept -> Future< <see below> >; SWS_CORE_06237
valid دالة

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

bool valid () const noexcept;
wait دالة

Wait for a value or an error to be available. This function shall behave the same as the corresponding std::future function ≙ std::future

void wait () const noexcept;
wait_for دالة

Wait for the given period, or until a value or an error is available. This function shall behave the same as the corresponding std::future function ≙ std::future

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

Wait until the given time, or until a value or an error is available. This function shall behave the same as the corresponding std::future function. ≙ std::future

template <typename Clock, typename Duration> FutureStatus wait_until (const std::chrono::time_point< Clock, Duration > &deadline) const noexcept;

المعاملات

operator= دالة 2

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

التحميلات الزائدة = 2
Future & operator= (Future &&other) noexcept; SWS_CORE_06225
Future & operator= (const Future &other)=delete; SWS_CORE_06235

توثيق الدوال

دالة Future [SWS_CORE_06222] Upstream: RS_AP_00130

Future () noexcept;

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

Header-Datei#include "ara/core/future.h"
Scopeclass ara::core::Future< void, E >
Exception-Sicherheitexception safe
Thread-Sicherheitthread-safe

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

Record
AUTOSAR/AP/record/SWS_CORE_06222
Status
valid/unmigrated
Version
AUTOSAR/AP/record/SWS_CORE_06222@rel:R25-11#7a2b32eb
Content hash
7a2b32eb
Source
https://www.autosar.org/fileadmin/standards/R25-11/AP/AUTOSAR_AP_SWS_Core.pdf#nameddest=SWS_CORE_06222
Status: valid/unmigrated Version: rel:R25-11#5a060501 Versionshistorie & Revisions (1 transition, 8 revision)
Current State
valid/unmigrated
Reason
mechanically backfilled by migriere_status_backfill.py -- no per-field curation history exists yet for this record
Campaign
2026-08-13-status-backfill
Active Version
AUTOSAR/AP/record/SWS_CORE_06222@rel:R25-11#5a060501
Point-in-Time History:
Recorded Revisions (8):
  • R25-11rel:R25-11#1afcba652026-09-30
  • R19-11rel:R19-11#0daa41512026-10-14
  • R20-11rel:R20-11#2b96cd1f2026-10-14
  • R21-11rel:R21-11#2b96cd1f2026-10-14
  • R22-11rel:R22-11#769923512026-10-14
  • R23-11rel:R23-11#5dfa683d2026-10-14
  • R24-11rel:R24-11#5c2585642026-10-14
  • R25-11rel:R25-11#5a0605012026-10-14 active
DateActorTransitionReason / RationaleCampaign
2026-08-13toolnone → valid/unmigratedmechanically backfilled by migriere_status_backfill.py -- no per-field curation history exists yet for this record2026-08-13-status-backfill

دالة Future [SWS_CORE_06223] Upstream: RS_AP_00130

Future (Future &&other) noexcept;

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

Header-Datei#include "ara/core/future.h"
Scopeclass ara::core::Future< void, E >
Exception-Sicherheitexception safe
Thread-Sicherheitnot thread-safe

Parameter (in)

ParameterBeschreibung
otherthe other instance

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

Record
AUTOSAR/AP/record/SWS_CORE_06223
Status
valid/unmigrated
Version
AUTOSAR/AP/record/SWS_CORE_06223@rel:R25-11#badbcd5f
Content hash
badbcd5f
Source
https://www.autosar.org/fileadmin/standards/R25-11/AP/AUTOSAR_AP_SWS_Core.pdf#nameddest=SWS_CORE_06223
Status: valid/unmigrated Version: rel:R25-11#d8ab302b Versionshistorie & Revisions (1 transition, 8 revision)
Current State
valid/unmigrated
Reason
mechanically backfilled by migriere_status_backfill.py -- no per-field curation history exists yet for this record
Campaign
2026-08-13-status-backfill
Active Version
AUTOSAR/AP/record/SWS_CORE_06223@rel:R25-11#d8ab302b
Point-in-Time History:
Recorded Revisions (8):
  • R25-11rel:R25-11#c4ca9e912026-09-30
  • R19-11rel:R19-11#a14b593d2026-10-14
  • R20-11rel:R20-11#29b853f02026-10-14
  • R21-11rel:R21-11#29b853f02026-10-14
  • R22-11rel:R22-11#0b366b7e2026-10-14
  • R23-11rel:R23-11#4e1158ee2026-10-14
  • R24-11rel:R24-11#43ec03e42026-10-14
  • R25-11rel:R25-11#d8ab302b2026-10-14 active
DateActorTransitionReason / RationaleCampaign
2026-08-13toolnone → valid/unmigratedmechanically backfilled by migriere_status_backfill.py -- no per-field curation history exists yet for this record2026-08-13-status-backfill

دالة Future [SWS_CORE_06234] Upstream: RS_AP_00130

Future (const Future &other)=delete;

Copy constructor shall be disabled

Header-Datei#include "ara/core/future.h"
Scopeclass ara::core::Future< void, E >

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

Record
AUTOSAR/AP/record/SWS_CORE_06234
Status
valid/unmigrated
Version
AUTOSAR/AP/record/SWS_CORE_06234@rel:R25-11#ac6dc52f
Content hash
ac6dc52f
Source
https://www.autosar.org/fileadmin/standards/R25-11/AP/AUTOSAR_AP_SWS_Core.pdf#nameddest=SWS_CORE_06234
Status: valid/unmigrated Version: rel:R25-11#56462c5d Versionshistorie & Revisions (1 transition, 8 revision)
Current State
valid/unmigrated
Reason
mechanically backfilled by migriere_status_backfill.py -- no per-field curation history exists yet for this record
Campaign
2026-08-13-status-backfill
Active Version
AUTOSAR/AP/record/SWS_CORE_06234@rel:R25-11#56462c5d
Point-in-Time History:
Recorded Revisions (8):
  • R25-11rel:R25-11#f81e62902026-09-30
  • R19-11rel:R19-11#544640f62026-10-14
  • R20-11rel:R20-11#d96a22e02026-10-14
  • R21-11rel:R21-11#ea4dbae52026-10-14
  • R22-11rel:R22-11#302289e52026-10-14
  • R23-11rel:R23-11#8c086a182026-10-14
  • R24-11rel:R24-11#7c2e887e2026-10-14
  • R25-11rel:R25-11#56462c5d2026-10-14 active
DateActorTransitionReason / RationaleCampaign
2026-08-13toolnone → valid/unmigratedmechanically backfilled by migriere_status_backfill.py -- no per-field curation history exists yet for this record2026-08-13-status-backfill

دالة GetResult [SWS_CORE_06236] Upstream: RS_AP_00130

Result< void, E > GetResult () noexcept(std::is_nothrow_move_ constructible< E >::value);

Get the result. Similar to Future::get(), this call blocks until the value or an error is available. However, this call will never throw an exception. Part of the behavior taken from Future::get() is that after a call to this function the Future is not valid anymore (valid() == false).

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

Rückgabewert

TypBeschreibung
Result< void, E >a Result as std::move(result from the shared state) with either a value or an error that has been put into the corresponding Promise. This can be because either: • explicit setting of the Error via Promise::SetError / Promise::Set Result or • the Promise was broken, meaning the shared state was abandoned by the corresponding Promise. Then the error is kBrokenPromise as defined in [SWS_CORE_00400]

Fehler

FehlercodeBeschreibung
FutureErrc::kBrokenPromiserollback_semantics if the Promise was broken, meaning the shared state was abandoned by the corresponding Promise.

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

Record
AUTOSAR/AP/record/SWS_CORE_06236
Status
valid/unmigrated
Version
AUTOSAR/AP/record/SWS_CORE_06236@rel:R25-11#ec2de16c
Content hash
ec2de16c
Source
https://www.autosar.org/fileadmin/standards/R25-11/AP/AUTOSAR_AP_SWS_Core.pdf#nameddest=SWS_CORE_06236
Status: valid/unmigrated Version: rel:R25-11#932914cb Versionshistorie & Revisions (1 transition, 8 revision)
Current State
valid/unmigrated
Reason
mechanically backfilled by migriere_status_backfill.py -- no per-field curation history exists yet for this record
Campaign
2026-08-13-status-backfill
Active Version
AUTOSAR/AP/record/SWS_CORE_06236@rel:R25-11#932914cb
Point-in-Time History:
Recorded Revisions (8):
  • R25-11rel:R25-11#7184bdc92026-09-30
  • R19-11rel:R19-11#541daac72026-10-14
  • R20-11rel:R20-11#3adb03532026-10-14
  • R21-11rel:R21-11#3adb03532026-10-14
  • R22-11rel:R22-11#4366d27f2026-10-14
  • R23-11rel:R23-11#f033d7132026-10-14
  • R24-11rel:R24-11#243860772026-10-14
  • R25-11rel:R25-11#932914cb2026-10-14 active
DateActorTransitionReason / RationaleCampaign
2026-08-13toolnone → valid/unmigratedmechanically backfilled by migriere_status_backfill.py -- no per-field curation history exists yet for this record2026-08-13-status-backfill

دالة get [SWS_CORE_06226] Upstream: RS_AP_00130

void get () noexcept(false);

Returns nothing. This function shall behave the same as the corresponding std::future function. Part of the behavior taken from the std::future is that after a call to this function the Future is not valid anymore (valid() == false).

مُولَّد بالذكاء الاصطناعي غير مُراجَع النموذج: gemini-3.8-flash-medium · الجهد: medium · درجة الحرارة: غير قابل للتحكم · الموجّه: 195e9e272b48 المصدر
مترجم من الدليل الألمانيgemini-3.8-flash-low · 2026-10-13 · الأصل الألماني

تُستخدم الدالة العضو get للتخصيص ara::core::Future<void, E> للانتظار حتى تتوفر نتيجة عملية غير متزامنة بدون قيمة إرجاع ([SWS_CORE_06226]). وهي تتصرف مثل الدالة المقابلة لـ std::future وتحجب المتصل حتى تتوفر النتيجة أو يحدث خطأ ([SWS_CORE_06226]، [SWS_CORE_00336]). بعد الاستدعاء تفقد كينونة Future صلاحيتها، بحيث ينطبق valid() == false ([SWS_CORE_06226]).

تم التصريح عن الدالة بأنها غير آمنة من حيث الاستثناءات (not exception safe) ([SWS_CORE_06226]). إذا تم إيداع خطأ في Promise المرتبط، فسيتم إطلاق استثناء مطابق ([SWS_CORE_06226]). وإذا تم التخلي عن الحالة المشتركة قبل الأوان، فسيحدث رمز الخطأ kBrokenPromise وفقاً لـ [SWS_CORE_00400] ([SWS_CORE_06226]). إذا تم تنفيذ get على كينونة غير صالحة بالفعل، فستطلق الدالة FutureException مع رمز الخطأ kNoState ([SWS_CORE_06226]).

فيما يتعلق بالتزامن، فإن الطريقة غير آمنة للخيوط (not thread-safe) ([SWS_CORE_06226]). ولذلك تتطلب عمليات الوصول المتوازية إلى نفس الكائن مزامنة خارجية. بالإضافة إلى ذلك، لا تشارك الدالة في حل التحميل الزائد إذا تم تعطيل استثناءات ++C في سلسلة أدوات المترجم ([SWS_CORE_06226]).

في إطار التفاعل مع الدوال المرتبطة، يضمن [SWS_CORE_00332] (is_ready) أن get لن يحجب بالتأكيد إذا كانت العملية قد اكتملت بالفعل. بالنسبة للسياقات الخالية من الاستثناءات، يقدم AUTOSAR البديل [SWS_CORE_00336] (GetResult)، والذي يُبلغ عن الأخطاء عبر نوع النتيجة بدلاً من إطلاق الاستثناءات.

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

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

Rückgabewert

TypBeschreibung
None

Exceptions

Any exception of the type associated with the error that has been put into the corresponding Promise. This can be because either: • explicit setting of the Error via: Promise::SetError(E&&) Promise::SetError(const E&) / Promise::SetResult(const Result<T, E>&) Promise::SetResult(Result <T, E>&&) • the Promise was broken, meaning the shared state was abandoned by the corresponding Promise. Then the error is kBrokenPromise as defined in [SWS_CORE_00400]. FutureException in case the Future is invalid. The contained ErrorCode is kNoState

Hinweise: This function shall not participate in overload resolution when C++ exceptions are disabled in the compiler toolchain

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

Record
AUTOSAR/AP/record/SWS_CORE_06226
Status
valid/unmigrated
Version
AUTOSAR/AP/record/SWS_CORE_06226@rel:R25-11#e9d63be1
Content hash
e9d63be1
Source
https://www.autosar.org/fileadmin/standards/R25-11/AP/AUTOSAR_AP_SWS_Core.pdf#nameddest=SWS_CORE_06226
Status: valid/unmigrated Version: rel:R25-11#6ad2ffae Versionshistorie & Revisions (1 transition, 8 revision)
Current State
valid/unmigrated
Reason
mechanically backfilled by migriere_status_backfill.py -- no per-field curation history exists yet for this record
Campaign
2026-08-13-status-backfill
Active Version
AUTOSAR/AP/record/SWS_CORE_06226@rel:R25-11#6ad2ffae
Point-in-Time History:
Recorded Revisions (8):
  • R25-11rel:R25-11#40fe52062026-09-30
  • R19-11rel:R19-11#877183822026-10-14
  • R20-11rel:R20-11#561b11012026-10-14
  • R21-11rel:R21-11#cd0d4bbb2026-10-14
  • R22-11rel:R22-11#41a0b49a2026-10-14
  • R23-11rel:R23-11#2c6048102026-10-14
  • R24-11rel:R24-11#2f0d210c2026-10-14
  • R25-11rel:R25-11#6ad2ffae2026-10-14 active
DateActorTransitionReason / RationaleCampaign
2026-08-13toolnone → valid/unmigratedmechanically backfilled by migriere_status_backfill.py -- no per-field curation history exists yet for this record2026-08-13-status-backfill

دالة is_ready [SWS_CORE_06232] Upstream: RS_AP_00130

bool is_ready () const noexcept;

Return whether the asynchronous operation has finished. If this function returns true, get(), Get Result() and the wait calls are guaranteed not to block.

Header-Datei#include "ara/core/future.h"
Scopeclass ara::core::Future< void, E >
Exception-Sicherheitexception safe
Thread-Sicherheitthread-safe
Verletzungen (Violations)FutureInvalidVio- If the Future is invalid (valid returns false) lation

Rückgabewert

TypBeschreibung
booltrue if the Future contains a value or an error, false otherwise

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

Record
AUTOSAR/AP/record/SWS_CORE_06232
Status
valid/unmigrated
Version
AUTOSAR/AP/record/SWS_CORE_06232@rel:R25-11#51adc6cd
Content hash
51adc6cd
Source
https://www.autosar.org/fileadmin/standards/R25-11/AP/AUTOSAR_AP_SWS_Core.pdf#nameddest=SWS_CORE_06232
Status: valid/unmigrated Version: rel:R25-11#5186dad5 Versionshistorie & Revisions (1 transition, 8 revision)
Current State
valid/unmigrated
Reason
mechanically backfilled by migriere_status_backfill.py -- no per-field curation history exists yet for this record
Campaign
2026-08-13-status-backfill
Active Version
AUTOSAR/AP/record/SWS_CORE_06232@rel:R25-11#5186dad5
Point-in-Time History:
Recorded Revisions (8):
  • R25-11rel:R25-11#4784afca2026-09-30
  • R19-11rel:R19-11#b80f30db2026-10-14
  • R20-11rel:R20-11#e1d9ba9b2026-10-14
  • R21-11rel:R21-11#6a9c97832026-10-14
  • R22-11rel:R22-11#d2f71e3d2026-10-14
  • R23-11rel:R23-11#26d4877a2026-10-14
  • R24-11rel:R24-11#7af5dd2e2026-10-14
  • R25-11rel:R25-11#5186dad52026-10-14 active
DateActorTransitionReason / RationaleCampaign
2026-08-13toolnone → valid/unmigratedmechanically backfilled by migriere_status_backfill.py -- no per-field curation history exists yet for this record2026-08-13-status-backfill

دالة operator= [SWS_CORE_06225] Upstream: RS_AP_00130

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

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

Header-Datei#include "ara/core/future.h"
Scopeclass ara::core::Future< void, E >
Exception-Sicherheitexception safe
Thread-Sicherheitnot thread-safe

Parameter (in)

ParameterBeschreibung
otherthe other instance

Rückgabewert

TypBeschreibung
Future &*this

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

Record
AUTOSAR/AP/record/SWS_CORE_06225
Status
valid/unmigrated
Version
AUTOSAR/AP/record/SWS_CORE_06225@rel:R25-11#f02670c3
Content hash
f02670c3
Source
https://www.autosar.org/fileadmin/standards/R25-11/AP/AUTOSAR_AP_SWS_Core.pdf#nameddest=SWS_CORE_06225
Status: valid/unmigrated Version: rel:R25-11#9232ee22 Versionshistorie & Revisions (1 transition, 8 revision)
Current State
valid/unmigrated
Reason
mechanically backfilled by migriere_status_backfill.py -- no per-field curation history exists yet for this record
Campaign
2026-08-13-status-backfill
Active Version
AUTOSAR/AP/record/SWS_CORE_06225@rel:R25-11#9232ee22
Point-in-Time History:
Recorded Revisions (8):
  • R25-11rel:R25-11#354308df2026-09-30
  • R19-11rel:R19-11#7ddd3a9d2026-10-14
  • R20-11rel:R20-11#309f3c9c2026-10-14
  • R21-11rel:R21-11#8d4849c42026-10-14
  • R22-11rel:R22-11#9833c73f2026-10-14
  • R23-11rel:R23-11#b37e21992026-10-14
  • R24-11rel:R24-11#9232ee222026-10-14
  • R25-11rel:R25-11#9232ee222026-10-14 active
DateActorTransitionReason / RationaleCampaign
2026-08-13toolnone → valid/unmigratedmechanically backfilled by migriere_status_backfill.py -- no per-field curation history exists yet for this record2026-08-13-status-backfill

دالة operator= [SWS_CORE_06235] Upstream: RS_AP_00130

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

Copy assignment operator shall be disabled

Header-Datei#include "ara/core/future.h"
Scopeclass ara::core::Future< void, E >

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

Record
AUTOSAR/AP/record/SWS_CORE_06235
Status
valid/unmigrated
Version
AUTOSAR/AP/record/SWS_CORE_06235@rel:R25-11#e6992899
Content hash
e6992899
Source
https://www.autosar.org/fileadmin/standards/R25-11/AP/AUTOSAR_AP_SWS_Core.pdf#nameddest=SWS_CORE_06235
Status: valid/unmigrated Version: rel:R25-11#2ab3479c Versionshistorie & Revisions (1 transition, 8 revision)
Current State
valid/unmigrated
Reason
mechanically backfilled by migriere_status_backfill.py -- no per-field curation history exists yet for this record
Campaign
2026-08-13-status-backfill
Active Version
AUTOSAR/AP/record/SWS_CORE_06235@rel:R25-11#2ab3479c
Point-in-Time History:
Recorded Revisions (8):
  • R25-11rel:R25-11#7aa2f7952026-09-30
  • R19-11rel:R19-11#e583d7bd2026-10-14
  • R20-11rel:R20-11#d21de51e2026-10-14
  • R21-11rel:R21-11#d21de51e2026-10-14
  • R22-11rel:R22-11#31fde6ef2026-10-14
  • R23-11rel:R23-11#de56c2ed2026-10-14
  • R24-11rel:R24-11#fd4c55142026-10-14
  • R25-11rel:R25-11#2ab3479c2026-10-14 active
DateActorTransitionReason / RationaleCampaign
2026-08-13toolnone → valid/unmigratedmechanically backfilled by migriere_status_backfill.py -- no per-field curation history exists yet for this record2026-08-13-status-backfill

دالة then [SWS_CORE_06231] Upstream: RS_AP_00130

template <typename F> auto then (F &&func) noexcept -> Future< <see below> >;

Create a new Future with the content returned by func when passed the Result of this Future. func may be called in the context of this call or in the context of Promise::set_value() or Promise::SetError() or somewhere else. valid() == false on the original future object immediately after it returns. The Callable input argument "func" takes a Result<void,E> object as parameter. This will be the Result obtained via GetResult from the Future instance itself, on which .then() is being called. The Result is passed to func as an rvalue expression. The return type of then depends on the return type of func (aka continuation). Let U be the return type of the continuation (i.e. a type equivalent to std::invoke_result_ t<std::decay_t<F>,Result<void,E>>). • If U is Future<T2,E2> for some types T2, E2, then the return type of then() is Future<T2,E2>. This is known as implicit Future unwrapping. • If U is Result<T2,E2> for some types T2, E2, then the return type of then() is Future<T2,E2>. This is known as implicit Result unwrapping. • Otherwise it is Future<U,E>. Continuations that are registered with Future::then() are registered in the Future F that Future::then() returns. No such continuation shall be executed after the destructor of the Future F returns. A continuation that is already being executed shall run to completion. Note: that means that the destructor of Future might block until the currently running continuation has been completed. The continuation shall not throw, except for the purpose of implementing a Violation. Note: Exceptions can be used within the continuation, however if they do not realize a Violation, they must not escape the continuation. Note: Users who need to propagate information from closures’ exceptions should translate them to an error and return an ara::core::Result or ara::core::Future from the continuation with the error stored in it.

مُولَّد بالذكاء الاصطناعي غير مُراجَع النموذج: gemini-3.8-flash-medium · الجهد: medium · درجة الحرارة: غير قابل للتحكم · الموجّه: 161f9bad96ab المصدر
مترجم من الدليل الألمانيgemini-3.8-flash-low · 2026-10-13 · الأصل الألماني

الاستخدام

تسجل الطريقة then عملية تابعة (Continuation func) في كينونة ara::core::Future<void, E> [SWS_CORE_06231]. يستقبل الكائن القابل للاستدعاء نتيجة العملية كتعبير Rvalue من النوع Result<void, E>، والذي يتم توفيره داخلياً عبر GetResult [SWS_CORE_06231]. يمكن أن يتم استدعاء func بشكل متزامن في سياق then أو بشكل غير متزامن في سياق Promise::set_value() أو Promise::SetError() أو في موضع آخر [SWS_CORE_06231].

مباشرة بعد العودة من then، يصبح Future الأصلي غير صالح (valid() == false) [SWS_CORE_06231]. ويتكيف نوع الإرجاع مع نوع الإرجاع U الخاص بـ Continuation:

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

معالجة الأخطاء والشروط الحدية

لم يتم تحديد رموز خطأ قياسية لهذه الدالة [SWS_CORE_06231]. تم التصريح عن الطريقة بأنها noexcept، ولكنها تحدد انتهاكين (Violations):

  • FutureInvalidViolation: يحدث عند استدعاء الطريقة على Future غير صالح (إذا أرجع valid() القيمة false) [SWS_CORE_06231].
  • FutureContinuationHasThrownViolation: يحدث إذا أطلقت Continuation استثناءً لا يحقق Violation [SWS_CORE_06231]. ويجب بدلاً من ذلك إرجاع الأخطاء في Continuation مغلفة في Result أو Future [SWS_CORE_06231].

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

الطريقة ليست آمنة للخيوط (not thread-safe) [SWS_CORE_06231]. بعد عودة مدمر كائن Future المرجع، لن يتم تنفيذ أي Continuation مسجلة؛ ومع ذلك، سيتم إكمال أي تنفيذ قيد التشغيل بالفعل، مما قد يتسبب في حجب المدمر [SWS_CORE_06231]. وبينما ينطبق [SWS_CORE_06231] على Future<void, E>، يصف [SWS_CORE_00331] المتغير الخاص بكائنات Future ذات النوع المحدد Future<T, E> و[SWS_CORE_06237] التحميل الزائد باستخدام Executor صريح.

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

Header-Datei#include "ara/core/future.h"
Scopeclass ara::core::Future< void, E >
Exception-Sicherheitexception safe
Thread-Sicherheitnot thread-safe
Verletzungen (Violations)FutureInvalidVio- If the Future is invalid (valid returns false) lation FutureContinua- If the continuation throws an exception tionHasThrownVio- lation

Parameter (in)

ParameterBeschreibung
funca callable to register

Rückgabewert

TypBeschreibung
Future< <see below> >a new Future instance for the result of the continuation

Fehler

FehlercodeBeschreibung
This function does not specify any standardized errors.

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

Record
AUTOSAR/AP/record/SWS_CORE_06231
Status
valid/unmigrated
Version
AUTOSAR/AP/record/SWS_CORE_06231@rel:R25-11#c7159743
Content hash
c7159743
Source
https://www.autosar.org/fileadmin/standards/R25-11/AP/AUTOSAR_AP_SWS_Core.pdf#nameddest=SWS_CORE_06231
Status: valid/unmigrated Version: rel:R25-11#21619af0 Versionshistorie & Revisions (1 transition, 8 revision)
Current State
valid/unmigrated
Reason
mechanically backfilled by migriere_status_backfill.py -- no per-field curation history exists yet for this record
Campaign
2026-08-13-status-backfill
Active Version
AUTOSAR/AP/record/SWS_CORE_06231@rel:R25-11#21619af0
Point-in-Time History:
Recorded Revisions (8):
  • R25-11rel:R25-11#9e67efce2026-09-30
  • R19-11rel:R19-11#b5665d0f2026-10-14
  • R20-11rel:R20-11#0cd22f812026-10-14
  • R21-11rel:R21-11#f603398f2026-10-14
  • R22-11rel:R22-11#b27b86212026-10-14
  • R23-11rel:R23-11#2173d0cf2026-10-14
  • R24-11rel:R24-11#273db5c82026-10-14
  • R25-11rel:R25-11#21619af02026-10-14 active
DateActorTransitionReason / RationaleCampaign
2026-08-13toolnone → valid/unmigratedmechanically backfilled by migriere_status_backfill.py -- no per-field curation history exists yet for this record2026-08-13-status-backfill

دالة then [SWS_CORE_06237] Upstream: RS_AP_00130

template <typename F, typename ExecutorT> auto then (F &&func, ExecutorT &&executor) noexcept -> Future< <see below> >;

Create a new Future with the content returned by func when passed the Result of this Future. func is called in the context of the provided execution context executor. valid() == false on the original future object immediately after it returns. The Callable input argument "func" takes a Result<void,E> object as parameter. This will be the Result obtained via GetResult from the Future instance itself, on which .then() is being called. The Result is passed to func as an rvalue expression. The return type of then depends on the return type of func (aka continuation). Let U be the return type of the continuation (i.e. a type equivalent to std::invoke_result_ t<std::decay_t<F>,Result<void,E>>). • If U is Future<T2,E2> for some types T2, E2, then the return type of then() is Future<T2,E2>. This is known as implicit Future unwrapping. • If U is Result<T2,E2> for some types T2, E2, then the return type of then() is Future<T2,E2>. This is known as implicit Result unwrapping. • Otherwise it is Future<U,E>. Continuations that are registered with Future::then() are registered in the Future F that Future::then() returns. No such continuation shall be executed after the destructor of the Future F returns. A continuation that is already being executed shall run to completion. Note: that means that the destructor of Future might block until the currently running continuation has been completed. The continuation shall not throw, except for the purpose of implementing a Violation. Note: Exceptions can be used within the continuation, however if they do not realize a Violation, they must not escape the continuation. Note: Users who need to propagate information from closures’ exceptions should translate them to an error and return an ara::core::Result or ara::core::Future from the continuation with the error stored in it.

مُولَّد بالذكاء الاصطناعي غير مُراجَع النموذج: gemini-3.8-flash-medium · الجهد: medium · درجة الحرارة: غير قابل للتحكم · الموجّه: 96d3b0e93b60 المصدر
مترجم من الدليل الألمانيgemini-3.8-flash-low · 2026-10-13 · الأصل الألماني

تسجل الدالة then كائن متابعة قابل للاستدعاء (Continuation) func على نسخة من ara::core::Future<void, E> للتنفيذ في سياق التنفيذ المحدد executor [SWS_CORE_06237]. وتفقد نسخة Future المستدعية صلاحيتها فور إرجاع then، بحيث يكون valid() == false [SWS_CORE_06237]. وتتلقى المتابعة نتيجة نسخة Future الأصلية كـ Result<void, E> ممررة في شكل تعبير rvalue [SWS_CORE_06237]. ويُرجع الاستدعاء كقيمة إرجاع نسخة جديدة من Future، حيث يتم فك أنواع إرجاع المتابعة من النوع Future<T2, E2> أو Result<T2, E2> ضمنيًا إلى Future<T2, E2>؛ وإلا فإنه يتم إرجاع Future<U, E> [SWS_CORE_06237].

فيما يتعلق بالتزامن ودورة الحياة، حُددت الدالة على أنها غير آمنة خيطيًا (not thread-safe) [SWS_CORE_06237]. وتُسجل المتابعة في الـ Future الجديد المُرجع. وبعد عودة مدمر هذا الـ Future الجديد، لا يجوز تنفيذ أي متابعة بعد ذلك؛ ومع ذلك، فإن أي متابعة قيد التنفيذ بالفعل تكتمل حتى نهايتها تمامًا، ولهذا السبب قد يحجب مدمر الـ Future التنفيذ [SWS_CORE_06237].

لا تُعلن الدالة عن أي رموز خطأ قياسية وهي مُعرفة كـ noexcept [SWS_CORE_06237]. وإذا استُدعيت على نسخة Future غير صالحة، فإن ذلك يمثل الانتهاك FutureInvalidViolation [SWS_CORE_06237]. وإذا طرحت المتابعة استثناءً، فإن هذا يؤدي إلى الانتهاك FutureContinuationHasThrownViolation [SWS_CORE_06237]. ويجب ألا تغادر الاستثناءات المتابعة، بل يلزم عند الحاجة ترجمتها إلى قيم أخطاء وإرجاعها ضمن Result أو Future [SWS_CORE_06237]. وتُكمل الدالة المتغير الخالي من المُنفِّذ [SWS_CORE_06231] وتشكل النظير للتحميلات الزائدة ذات القيم [SWS_CORE_00331] وكذلك [SWS_CORE_00337].

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

Header-Datei#include "ara/core/future.h"
Scopeclass ara::core::Future< void, E >
Exception-Sicherheitexception safe
Thread-Sicherheitnot thread-safe
Verletzungen (Violations)FutureInvalidVio- If the Future is invalid (valid returns false) lation FutureContinua- If the continuation throws an exception. tionHasThrownVio- lation

Template-Parameter

ParameterBeschreibung
FExecutorTthe type of the func argument the type of the executor argument

Parameter (in)

ParameterBeschreibung
funca callable to register
executorthe execution context in which to execute the Callable func

Rückgabewert

TypBeschreibung
Future< <see below> >a new Future instance for the result of the continuation

Fehler

FehlercodeBeschreibung
This function does not specify any standardized errors.

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

Record
AUTOSAR/AP/record/SWS_CORE_06237
Status
valid/unmigrated
Version
AUTOSAR/AP/record/SWS_CORE_06237@rel:R25-11#d72e3195
Content hash
d72e3195
Source
https://www.autosar.org/fileadmin/standards/R25-11/AP/AUTOSAR_AP_SWS_Core.pdf#nameddest=SWS_CORE_06237
Status: valid/unmigrated Version: rel:R25-11#58e4cf50 Versionshistorie & Revisions (1 transition, 7 revision)
Current State
valid/unmigrated
Reason
mechanically backfilled by migriere_status_backfill.py -- no per-field curation history exists yet for this record
Campaign
2026-08-13-status-backfill
Active Version
AUTOSAR/AP/record/SWS_CORE_06237@rel:R25-11#58e4cf50
Point-in-Time History:
Recorded Revisions (7):
  • R25-11rel:R25-11#e39189402026-09-30
  • R20-11rel:R20-11#5e1b7f5b2026-10-14
  • R21-11rel:R21-11#1e3cbb002026-10-14
  • R22-11rel:R22-11#e2d3ef1a2026-10-14
  • R23-11rel:R23-11#8b2f870e2026-10-14
  • R24-11rel:R24-11#27088c392026-10-14
  • R25-11rel:R25-11#58e4cf502026-10-14 active
DateActorTransitionReason / RationaleCampaign
2026-08-13toolnone → valid/unmigratedmechanically backfilled by migriere_status_backfill.py -- no per-field curation history exists yet for this record2026-08-13-status-backfill

دالة valid [SWS_CORE_06227] Upstream: RS_AP_00130

bool valid () const noexcept;

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

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

مُولَّد بالذكاء الاصطناعي غير مُراجَع النموذج: gemini-3.8-flash-medium · الجهد: medium · درجة الحرارة: غير قابل للتحكم · الموجّه: 480112e5c811 المصدر
مترجم من الدليل الألمانيgemini-3.8-flash-low · 2026-10-13 · الأصل الألماني

تتحقق الدالة valid() بشكل متزامن مما إذا كانت نسخة ara::core::Future<void, E> تمتلك حالة مشتركة (Shared State) وبالتالي تكون قابلة للاستخدام [SWS_CORE_06227]. وتتصرف وفقاً للمواصفة بشكل مماثل للدالة المقابلة من std::future [SWS_CORE_06227]. وكقيمة معادة، تُرجع true إذا كان الـ Future قابلاً للاستخدام، وfalse إذا كان غير قابل للاستخدام [SWS_CORE_06227].

فيما يتعلق بالتزامن ومعالجة الأخطاء، تم التصريح عن الأسلوب بـ noexcept، وتحديده كآمن للاستثناءات (exception safe) وبشكل صريح كآمن بالنسبة للخيوط (thread-safe) [SWS_CORE_06227]. وبالتالي يمكن استدعاؤه بأمان من سياقات متزامنة.

في إطار التفاعل مع عمليات أخرى، يُستخدم valid() لتأمين دورة الحياة:

  • إذا تم استدعاء عملية مثل wait() [SWS_CORE_06228] أو is_ready() [SWS_CORE_00332] على كائن Future غير صالح (valid() == false)، فإن ذلك يؤدي إلى إطلاق الانتهاك FutureInvalidViolation.
  • تُبطل العمليات المستهلكة صلاحية الكائن: بعد استدعاء get() لا يعود الـ Future صالحاً، بحيث تسفر عمليات الفحص اللاحقة باستخدام valid() عن القيمة false [SWS_CORE_06226].
  • وكذلك تؤدي عمليات إعادة التوجيه عبر then() [SWS_CORE_00331] أو استدعاءات GetResult() [SWS_CORE_00336] إلى إبطال صلاحية كائن الـ Future الأصلي على الفور.

تم إنشاء ملاحظة الاستخدام هذه بواسطة ذكاء اصطناعي بناءً على المواصفة.

دليل المنفِّذ قيد الإعداد (التعقيد I1)

Header-Datei#include "ara/core/future.h"
Scopeclass ara::core::Future< void, E >
Exception-Sicherheitexception safe
Thread-Sicherheitthread-safe

Rückgabewert

TypBeschreibung
bool• TRUE: the Future is usable • FALSE: the Future is NOT usable

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

Record
AUTOSAR/AP/record/SWS_CORE_06227
Status
valid/unmigrated
Version
AUTOSAR/AP/record/SWS_CORE_06227@rel:R25-11#572ffafa
Content hash
572ffafa
Source
https://www.autosar.org/fileadmin/standards/R25-11/AP/AUTOSAR_AP_SWS_Core.pdf#nameddest=SWS_CORE_06227
Status: valid/unmigrated Version: rel:R25-11#d38a60b4 Versionshistorie & Revisions (1 transition, 8 revision)
Current State
valid/unmigrated
Reason
mechanically backfilled by migriere_status_backfill.py -- no per-field curation history exists yet for this record
Campaign
2026-08-13-status-backfill
Active Version
AUTOSAR/AP/record/SWS_CORE_06227@rel:R25-11#d38a60b4
Point-in-Time History:
Recorded Revisions (8):
  • R25-11rel:R25-11#285420912026-09-30
  • R19-11rel:R19-11#2199fb4c2026-10-14
  • R20-11rel:R20-11#7a68b03e2026-10-14
  • R21-11rel:R21-11#a46ad2562026-10-14
  • R22-11rel:R22-11#6bc04f322026-10-14
  • R23-11rel:R23-11#bd2577342026-10-14
  • R24-11rel:R24-11#2f9de2d02026-10-14
  • R25-11rel:R25-11#d38a60b42026-10-14 active
DateActorTransitionReason / RationaleCampaign
2026-08-13toolnone → valid/unmigratedmechanically backfilled by migriere_status_backfill.py -- no per-field curation history exists yet for this record2026-08-13-status-backfill

دالة wait [SWS_CORE_06228] Upstream: RS_AP_00130

void wait () const noexcept;

Wait for a value or an error to be available. This function shall behave the same as the corresponding std::future function

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

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

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

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

في إطار التفاعل مع الدوال الأخرى للوحدة core، تتوفر الإمكانيات التالية:

  • باستخدام الطريقة الآمنة للخيوط is_ready، يمكن الاستعلام مسبقاً عما إذا كانت العملية قد اكتملت؛ وعند إرجاع true، يُضمن ألا يحجب wait مجدداً [SWS_CORE_06232].
  • لتجنب الحجب اللانهائي، تتوفر الدوال محددة الوقت wait_for بمدة نسبية [SWS_CORE_06229] وكذلك wait_until بنقطة زمنية مطلقة [SWS_CORE_06230].
  • بالنسبة لفئة القالب الأساسية ara::core::Future، تنطبق نفس متطلبات الانتظار المتزامن والقيود [SWS_CORE_00328].

تم تنسيق هذا النص بواسطة نظام ذكاء اصطناعي ويعتمد حصرياً على مواصفة AUTOSAR.

Header-Datei#include "ara/core/future.h"
Scopeclass ara::core::Future< void, E >
Exception-Sicherheitexception safe
Thread-Sicherheitnot thread-safe
Verletzungen (Violations)FutureInvalidVio- If the Future is invalid (valid returns false) lation

Rückgabewert

TypBeschreibung
None

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

Record
AUTOSAR/AP/record/SWS_CORE_06228
Status
valid/unmigrated
Version
AUTOSAR/AP/record/SWS_CORE_06228@rel:R25-11#1921bdfa
Content hash
1921bdfa
Source
https://www.autosar.org/fileadmin/standards/R25-11/AP/AUTOSAR_AP_SWS_Core.pdf#nameddest=SWS_CORE_06228
Status: valid/unmigrated Version: rel:R25-11#24670f02 Versionshistorie & Revisions (1 transition, 8 revision)
Current State
valid/unmigrated
Reason
mechanically backfilled by migriere_status_backfill.py -- no per-field curation history exists yet for this record
Campaign
2026-08-13-status-backfill
Active Version
AUTOSAR/AP/record/SWS_CORE_06228@rel:R25-11#24670f02
Point-in-Time History:
Recorded Revisions (8):
  • R25-11rel:R25-11#a06c2ef52026-09-30
  • R19-11rel:R19-11#4b7a7a422026-10-14
  • R20-11rel:R20-11#457c63ae2026-10-14
  • R21-11rel:R21-11#6b136de32026-10-14
  • R22-11rel:R22-11#3d7c381b2026-10-14
  • R23-11rel:R23-11#d02a0b222026-10-14
  • R24-11rel:R24-11#a383ce752026-10-14
  • R25-11rel:R25-11#24670f022026-10-14 active
DateActorTransitionReason / RationaleCampaign
2026-08-13toolnone → valid/unmigratedmechanically backfilled by migriere_status_backfill.py -- no per-field curation history exists yet for this record2026-08-13-status-backfill

دالة wait_for [SWS_CORE_06229] Upstream: RS_AP_00130

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

Wait for the given period, or until a value or an error is available. This function shall behave the same as the corresponding std::future function

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

تحجب الدالة wait_for للتخصيص ara::core::Future<void, E> خيط التنفيذ المتصل تزامنيًا لفترة زمنية قصوى timeoutDuration أو حتى تصبح النتيجة جاهزة [SWS_CORE_06229]. وتتصرف دلاليًا مثل الدالة القياسية المقابلة std::future::wait_for [SWS_CORE_06229].

تُرجع الدالة كقيمة إرجاع الحالة FutureStatus [SWS_CORE_06229]. وتشير هذه الحالة بواسطة FutureStatus::kReady إلى توفر قيمة أو خطأ، أو بواسطة FutureStatus::kTimeout إلى انقضاء المهلة الزمنية دون نتيجة [SWS_CORE_00361]. ولا توجد حالة مكافئة لـ std::future_status::deferred [SWS_CORE_00361]. ويتطابق هذا السلوك مع واجهة Future العامة [SWS_CORE_00329].

تنطبق الشروط التالية على الاستدعاء فيما يتعلق بالتزامن ومعالجة الأخطاء:

  • التزامن: حُددت الدالة على أنها غير آمنة خيطيًا (not thread-safe) [SWS_CORE_06229]. ويجب تأمين الاستدعاءات المتزامنة على النسخة نفسها من جهة المتصل.
  • حالات الخطأ وأمان الاستثناءات: أُعلنت العملية على أنها آمنة من حيث الاستثناءات (exception safe) وكذلك noexcept [SWS_CORE_06229]. وإذا كان كائن Future غير صالح (يُرجع valid() false)، فإن ذلك يمثل انتهاكًا FutureInvalidViolation [SWS_CORE_06229]. وبسبب الإعلان noexcept، فمن المرجح أن يؤدي هذا الانتهاك إلى إنهاء البرنامج فورًا. سؤال Q-4f01aa6e7fbfb12d (مفتوح)

تم إنشاء إشعار الاستخدام هذا آليًا استنادًا إلى مواصفة AUTOSAR Adaptive R25-11.

دليل المنفِّذ قيد الإعداد (التعقيد I1)

Header-Datei#include "ara/core/future.h"
Scopeclass ara::core::Future< void, E >
Exception-Sicherheitexception safe
Thread-Sicherheitnot thread-safe
Verletzungen (Violations)FutureInvalidVio- If the Future is invalid (valid returns false) lation

Parameter (in)

ParameterBeschreibung
timeoutDurationmaximal duration to wait for

Rückgabewert

TypBeschreibung
FutureStatusstatus that indicates whether the timeout hit or if a value is available

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

Record
AUTOSAR/AP/record/SWS_CORE_06229
Status
valid/unmigrated
Version
AUTOSAR/AP/record/SWS_CORE_06229@rel:R25-11#c1a2d946
Content hash
c1a2d946
Source
https://www.autosar.org/fileadmin/standards/R25-11/AP/AUTOSAR_AP_SWS_Core.pdf#nameddest=SWS_CORE_06229
Status: valid/unmigrated Version: rel:R25-11#cde767bb Versionshistorie & Revisions (1 transition, 8 revision)
Current State
valid/unmigrated
Reason
mechanically backfilled by migriere_status_backfill.py -- no per-field curation history exists yet for this record
Campaign
2026-08-13-status-backfill
Active Version
AUTOSAR/AP/record/SWS_CORE_06229@rel:R25-11#cde767bb
Point-in-Time History:
Recorded Revisions (8):
  • R25-11rel:R25-11#414f595f2026-09-30
  • R19-11rel:R19-11#8d512e042026-10-14
  • R20-11rel:R20-11#f89ce5282026-10-14
  • R21-11rel:R21-11#f89ce5282026-10-14
  • R22-11rel:R22-11#68d81b0f2026-10-14
  • R23-11rel:R23-11#534174642026-10-14
  • R24-11rel:R24-11#38872d6e2026-10-14
  • R25-11rel:R25-11#cde767bb2026-10-14 active
DateActorTransitionReason / RationaleCampaign
2026-08-13toolnone → valid/unmigratedmechanically backfilled by migriere_status_backfill.py -- no per-field curation history exists yet for this record2026-08-13-status-backfill

دالة wait_until [SWS_CORE_06230] Upstream: RS_AP_00130

template <typename Clock, typename Duration> FutureStatus wait_until (const std::chrono::time_point< Clock, Duration > &deadline) const noexcept;

Wait until the given time, or until a value or an error is available. This function shall behave the same as the corresponding std::future function.

مُولَّد بالذكاء الاصطناعي غير مُراجَع النموذج: gemini-3.8-flash-medium · الجهد: medium · درجة الحرارة: غير قابل للتحكم · الموجّه: 932b0d674f17 المصدر
مترجم من الدليل الألمانيgemini-3.8-flash-low · 2026-10-13 · الأصل الألماني

تحجب دالة العضو wait_until للتخصيص ara::core::Future<void, E> خيط الاستدعاء حتى الوصول إلى النقطة الزمنية المطلقة المحددة deadline أو حتى تتوفر قيمة أو خطأ [SWS_CORE_06230]. وتُظهر الدالة السلوك نفسه لدالة معيار C++‎ المقابلة std::future::wait_until [SWS_CORE_06230] وتمتلك الدلالة نفسها للتحميل الزائد العام لـ ara::core::Future [SWS_CORE_00330].

تشير قيمة الإرجاع من النوع FutureStatus إلى ما إذا كان قد تم الوصول إلى المهلة الزمنية أو تتوفر قيمة [SWS_CORE_06230]. وهنا تُظهر الحالة kReady أن الحالة المشتركة جاهزة، بينما تعني kTimeout أن الحالة المشتركة لم تصبح جاهزة قبل انقضاء المهلة [SWS_CORE_00361]. ولا توجد حالة مماثلة لـ std::future_status::deferred في FutureStatus [SWS_CORE_00361].

فيما يتعلق بالتنفيذ والشروط الحدية، حُددت المتطلبات التالية:

  • سياق الاستدعاء وسلوك الاستثناء: تتوفر الدالة عبر ملف الترويسة #include "ara/core/future.h"، ومُعلنة كـ noexcept، ومحددة كآمنة من حيث الاستثناءات (exception safe) [SWS_CORE_06230].
  • حالات الخطأ: إذا كان الـ Future غير صالح، أي عندما يُرجع valid() القيمة false، فإن ذلك يمثل الانتهاك FutureInvalidViolation [SWS_CORE_06230].
  • التزامن: صُنفت العملية على أنها غير آمنة خيطيًا (not thread-safe) [SWS_CORE_06230].

تم إنشاء إشعار الاستخدام هذا آليًا استنادًا إلى مواصفة AUTOSAR Adaptive R25-11.

دليل المنفِّذ قيد الإعداد (التعقيد I1)

Header-Datei#include "ara/core/future.h"
Scopeclass ara::core::Future< void, E >
Exception-Sicherheitexception safe
Thread-Sicherheitnot thread-safe
Verletzungen (Violations)FutureInvalidVio- If the Future is invalid (valid returns false) lation

Parameter (in)

ParameterBeschreibung
deadlinelatest point in time to wait

Rückgabewert

TypBeschreibung
FutureStatusstatus that indicates whether the time was reached or if a value is available

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

Record
AUTOSAR/AP/record/SWS_CORE_06230
Status
valid/unmigrated
Version
AUTOSAR/AP/record/SWS_CORE_06230@rel:R25-11#f5e78d8a
Content hash
f5e78d8a
Source
https://www.autosar.org/fileadmin/standards/R25-11/AP/AUTOSAR_AP_SWS_Core.pdf#nameddest=SWS_CORE_06230
Status: valid/unmigrated Version: rel:R25-11#f458c628 Versionshistorie & Revisions (1 transition, 8 revision)
Current State
valid/unmigrated
Reason
mechanically backfilled by migriere_status_backfill.py -- no per-field curation history exists yet for this record
Campaign
2026-08-13-status-backfill
Active Version
AUTOSAR/AP/record/SWS_CORE_06230@rel:R25-11#f458c628
Point-in-Time History:
Recorded Revisions (8):
  • R25-11rel:R25-11#eec83ed82026-09-30
  • R19-11rel:R19-11#73333c762026-10-14
  • R20-11rel:R20-11#291da1182026-10-14
  • R21-11rel:R21-11#cb6c719b2026-10-14
  • R22-11rel:R22-11#31de44c72026-10-14
  • R23-11rel:R23-11#944875602026-10-14
  • R24-11rel:R24-11#85fe57402026-10-14
  • R25-11rel:R25-11#f458c6282026-10-14 active
DateActorTransitionReason / RationaleCampaign
2026-08-13toolnone → valid/unmigratedmechanically backfilled by migriere_status_backfill.py -- no per-field curation history exists yet for this record2026-08-13-status-backfill

دالة ~Future [SWS_CORE_06233] Upstream: RS_AP_00130

~Future () noexcept;

Destructor for Future objects. Abandons any shared state

Header-Datei#include "ara/core/future.h"
Scopeclass ara::core::Future< void, E >
Exception-Sicherheitexception safe
Thread-Sicherheitthread-safe

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

Record
AUTOSAR/AP/record/SWS_CORE_06233
Status
valid/unmigrated
Version
AUTOSAR/AP/record/SWS_CORE_06233@rel:R25-11#db3061fd
Content hash
db3061fd
Source
https://www.autosar.org/fileadmin/standards/R25-11/AP/AUTOSAR_AP_SWS_Core.pdf#nameddest=SWS_CORE_06233
Status: valid/unmigrated Version: rel:R25-11#7ce4899e Versionshistorie & Revisions (1 transition, 8 revision)
Current State
valid/unmigrated
Reason
mechanically backfilled by migriere_status_backfill.py -- no per-field curation history exists yet for this record
Campaign
2026-08-13-status-backfill
Active Version
AUTOSAR/AP/record/SWS_CORE_06233@rel:R25-11#7ce4899e
Point-in-Time History:
Recorded Revisions (8):
  • R25-11rel:R25-11#32a6e0a42026-09-30
  • R19-11rel:R19-11#e8e5d2942026-10-14
  • R20-11rel:R20-11#feb4e8682026-10-14
  • R21-11rel:R21-11#a081de932026-10-14
  • R22-11rel:R22-11#40dcc5802026-10-14
  • R23-11rel:R23-11#8b89d85f2026-10-14
  • R24-11rel:R24-11#25b460852026-10-14
  • R25-11rel:R25-11#7ce4899e2026-10-14 active
DateActorTransitionReason / RationaleCampaign
2026-08-13toolnone → valid/unmigratedmechanically backfilled by migriere_status_backfill.py -- no per-field curation history exists yet for this record2026-08-13-status-backfill