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

사용자 가이드AI 생성

동시성 연산으로부터 값 및 오류를 동기식 또는 비동기식으로 수신할 수 있도록 합니다.
AI 생성 미검증 모델: 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]. 개념적으로 이 클래스는 C++17 표준 ISO/IEC 14882:2017 [11]의 std::future를 구현하지만, 플랫폼의 오류 예외 기반 개념에 매끄럽게 통합됩니다. 템플릿 매개변수 E에는 오류 타입 ara::core::ErrorCode가 필수로 지정되며, 이와 다른 지정은 모두 컴파일 오류로 이어집니다. 주요 상호작용 대상으로는 값 또는 오류를 제공하는 비동기 생산자(예: 연관된 Promise), 독점 수신자로서의 Future 인스턴스, 그리고 후속 작업이 전달되는 컨슈머 또는 실행 컨텍스트(ExecutorT)가 포함됩니다 [SWS_CORE_00331] [SWS_CORE_00337].

수명 주기

ara::core::Future의 생성, 상태 관리 및 소멸은 결정론적인 소유권 관계를 보장하기 위해 엄격한 규칙을 따릅니다:

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

상태 다이어그램: Shared State의 유효성 및 가용성과 관련된 Future 인스턴스의 수명 주기 및 상태 전이. 출처: [SWS_CORE_00322], [SWS_CORE_00326], [SWS_CORE_00327], [SWS_CORE_00331], [SWS_CORE_00332], [SWS_CORE_00333], [SWS_CORE_00336]

사용 경로

결과 처리를 위한 일반적인 사용 경로는 다음 단계로 구분됩니다:

  1. 상태 확인 및 동기화: is_ready()을 사용하여 비동기 결과가 이미 준비되어 있는지 사전에 확인할 수 있습니다 [SWS_CORE_00332]. 이미 준비된 경우 이후의 호출은 더 이상 차단되지 않음이 보장됩니다 [SWS_CORE_00332]. 그렇지 않은 경우 wait()을 사용하여 무제한 [SWS_CORE_00328]으로 동기화하거나 wait_for() 또는 wait_until()을 통해 시간 제한 방식으로 동기화할 수 있습니다 [SWS_CORE_00329] [SWS_CORE_00330].
  2. 결과 추출: AUTOSAR Adaptive 애플리케이션에서는 GetResult() 호출이 결정적입니다. 이 메서드는 필요한 경우 차단되지만 결코 예외를 발생시키지 않으며 값 또는 오류를 ara::core::Result<T, E>로 이동하여 전달합니다 [SWS_CORE_00336]. get() 메서드는 STL 적합성을 제공하며, 오류 발생 시 C++ 예외를 던지고 툴체인의 예외 처리가 비활성화된 경우 오버로드 확인에 참여하지 않습니다 [SWS_CORE_00326].
  3. 비동기 체이닝(Continuations): 동기식 차단 대신 then()을 통해 콜백을 등록할 수 있으며, 선택적으로 실행 컨텍스트(Executor)에 할당할 수 있습니다 [SWS_CORE_00331] [SWS_CORE_00337]. 콜백은 결과를 Result<T, E> rvalue로 수신합니다. 후속 작업 함수 자체가 Future 또는 Result를 반환하는 경우, then()은 자동 언래핑을 수행하고 해당하는 Future<T2, E2>을 직접 반환합니다 [SWS_CORE_00331] [SWS_CORE_00337].
GetResult()를 사용하는 비동기 흐름호출자FuturePromiseErzeugt Shared State & FutureUebergabe an KonsumentUse Case: 동기화 및 조회is_ready()falseSetResult(...) / SetError(...)GetResult()Shared State geleertvalid() == falseResult<T, E>

시퀀스 다이어그램: GetResult()를 통한 비동기 동기화 및 결과 수신의 일반적인 흐름. 출처: [SWS_CORE_00327], [SWS_CORE_00332], [SWS_CORE_00336]

오류 시나리오

ara::core::Future을 다룰 때 다음과 같은 오류 상황이 명시되어 있습니다:

  • 유효하지 않은 인스턴스에서의 호출: 유효하지 않은 인스턴스(valid() == false)에서 is_ready(), wait(), wait_for(), wait_until(), GetResult() 또는 then()를 호출하는 것은 FutureInvalidViolation에 해당합니다 [SWS_CORE_00328] [SWS_CORE_00329] [SWS_CORE_00330] [SWS_CORE_00331] [SWS_CORE_00332] [SWS_CORE_00336] [SWS_CORE_00337]. 이 경우 get()를 호출하면 오류 코드 kNoState을 가진 FutureException이 발생합니다 [SWS_CORE_00326].
  • 버려진 Shared State(Broken Promise): 연관된 Promise에 의해 Shared State가 조기에 포기되면, GetResult()은 표준화된 오류 코드 FutureErrc::kBrokenPromise를 가진 Result을 반환합니다 [SWS_CORE_00336]. get()를 호출하면 해당하는 예외가 발생합니다 [SWS_CORE_00326].
  • 후속 작업 함수 내의 예외: 등록된 Continuation은 Violation을 구현하기 위한 경우를 제외하고는 예외를 던져서는 안 됩니다. 그럼에도 불구하고 예외를 발생시키면 이는 FutureContinuationHasThrownViolation으로 이어집니다 [SWS_CORE_00331] [SWS_CORE_00337]. 클로저 내의 예외는 포착되어 Result 또는 Future 형태의 오류 상태로 반환되어야 합니다 [SWS_CORE_00331] [SWS_CORE_00337].

이 가이드는 AUTOSAR Adaptive Core(R25-11)의 사양 요구사항만을 기반으로 합니다.

멤버 맵

클래스 다이어그램

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#e56d0441
Content hash
e56d0441
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#76d90d02
Content hash
76d90d02
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#a409e3c4
Content hash
a409e3c4
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#0db1909f
Content hash
0db1909f
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 ).

AI 생성 미검증 모델: gemini-3.8-flash-medium · 노력: medium · 온도: 제어 불가 · 프롬프트: bdf8e21a85ce 출처
독일어 가이드에서 번역됨gemini-3.8-flash-low · 2026-10-13 · 독일어 원문

사용

메서드 get()은(는) ara::core::Future에서 T 타입의 결과를 동기식으로 가져옵니다([SWS_CORE_00326]). 이 함수는 std::future의 대응부와 동일하게 동작합니다. 비동기 계산이 아직 진행 중인 경우, 호출은 완료될 때까지 또는 오류가 발생할 때까지 차단(블록)됩니다([SWS_CORE_00336]). 호출을 통해 객체는 상태를 잃게 되어 Future는 즉시 무효화됩니다(valid() == false, [SWS_CORE_00326]). 비차단 호출은 사전에 is_ready()을(를) 통해 확인할 수 있습니다([SWS_CORE_00332]).

오류 처리

실패는 C++ 예외를 통해 보고됩니다([SWS_CORE_00326]).

  • 연관된 Promise에 SetError() 또는 SetResult()을(를) 통해 오류가 저장된 경우, 해당 오류 타입의 예외가 발생합니다([SWS_CORE_00326]).
  • 공유 상태(Shared State)가 비동기 작업에 의해 조기에 포기되면 FutureErrc에 따라 kBrokenPromise 오류가 발생합니다([SWS_CORE_00326], [SWS_CORE_00400]).
  • 유효하지 않은 인스턴스에서 호출이 수행되면 오류 코드 kNoState을(를) 갖는 FutureException이(가) 발생합니다([SWS_CORE_00326]).

동시성 및 제약사항

이 작업은 스레드 안전하지도 않고 예외 안전하지도 않습니다(not exception safe, [SWS_CORE_00326]). 여러 스레드에서 동일한 Future에 동시 접근하려면 외부 동기화가 필요합니다. 컴파일러 툴체인에서 예외가 비활성화된 경우 get()은(는) 오버로드 해결(overload resolution)에 참여하지 않습니다([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#760edd78
Content hash
760edd78
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#45950ad9
Content hash
45950ad9
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#08fe42f6
Content hash
08fe42f6
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#2c9d579e
Content hash
2c9d579e
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.

AI 생성 미검증 모델: gemini-3.8-flash-medium · 노력: medium · 온도: 제어 불가 · 프롬프트: 771d2952e4cb 출처
독일어 가이드에서 번역됨gemini-3.8-flash-low · 2026-10-13 · 독일어 원문

멤버 함수 then은(는) 비동기 계산의 체이닝에 사용되며 ara::core::Future 인스턴스에 호출 가능한 객체 func을(를) Continuation으로 등록합니다([SWS_CORE_00331]). 호출이 반환된 후 원래의 Future은(는) 유효하지 않게 됩니다(valid() == false). 호출 대상은 GetResult()을(를) 통해 얻은 인스턴스의 결과를 Result<T, E> 타입의 Rvalue로 전달받습니다([SWS_CORE_00331]).

then의 반환 타입은 Continuation의 반환 타입 U에 따라 결정됩니다([SWS_CORE_00331]).

  • func이(가) Future<T2, E2>을(를) 반환하면 Future<T2, E2>(으)로의 암시적 Future 언래핑이 수행됩니다([SWS_CORE_00331]).
  • func이(가) Result<T2, E2>을(를) 반환하면 Future<T2, E2>(으)로의 암시적 Result 언래핑이 수행됩니다([SWS_CORE_00331]).
  • 그 외 모든 경우 반환 타입은 Future<U, E>입니다([SWS_CORE_00331]).

func의 실행은 then 호출 컨텍스트에서 동기식으로, Promise::set_result 또는 Promise::SetError의 컨텍스트에서, 혹은 다른 컨텍스트에서 수행될 수 있습니다([SWS_CORE_00331]). 이 호출은 스레드 안전하지 않은 것으로 명세되어 있습니다. Continuation은 반환된 Future에 등록됩니다. 해당 소멸자가 반환된 후에는 더 이상 Continuation이 실행되어서는 안 되며, 이미 실행 중인 처리는 끝까지 실행됩니다([SWS_CORE_00331]).

표준화된 오류 코드는 존재하지 않습니다([SWS_CORE_00331]). 예외가 Continuation을 벗어나서는 안 되므로, 사용자는 오류를 포착하여 반환된 Result 또는 Future 내의 오류 코드로 전달해야 합니다. 유효하지 않은 Future에서의 호출은 FutureInvalidViolation을(를) 발생시키며, Continuation이 예외를 던지면 FutureContinuationHasThrownViolation의 결과가 발생합니다([SWS_CORE_00331]).

명시적 실행 컨텍스트에서의 실행을 위해 Executor가 포함된 오버로드가 제공되며([SWS_CORE_00337]), 반환값이 없는 작업의 경우에는 Void 특수화가 적용됩니다([SWS_CORE_06231]).

이 사용 지침은 AUTOSAR Adaptive R25-11 사양을 기반으로 AI에 의해 생성되었습니다.

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

Parameter (in)

ParameterBeschreibung
funca callable to register

Rückgabewert

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

Fehler

FehlercodeBeschreibung
This function does not specify any standardized errors.
Hinweise: Users who need to propagate information from closures’ exceptions should translate them to an error and return an ara::core::Result or ara::core::Future from the continuation with the error stored in it. Exceptions can be used within the continuation, however if they do not realize a Violation, they must not escape the continuation.

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

Record
AUTOSAR/AP/record/SWS_CORE_00331
Status
valid/unmigrated
Version
AUTOSAR/AP/record/SWS_CORE_00331@rel:R25-11#f1eec074
Content hash
f1eec074
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.

AI 생성 미검증 모델: gemini-3.8-flash-medium · 노력: medium · 온도: 제어 불가 · 프롬프트: b5ca6c97ece5 출처
독일어 가이드에서 번역됨gemini-3.8-flash-low · 2026-10-13 · 독일어 원문

사용법 및 의미론

메서드 then은 현재 Future 인스턴스의 결과가 준비되는 즉시 전달된 executor의 컨텍스트에서 비동기식으로 실행될 Continuation(func)을 등록합니다 [SWS_CORE_00337]. 호출 가능한 단위는 인스턴스의 결과를 Result<T,E> 타입의 Rvalue 표현식으로 받습니다 [SWS_CORE_00337]. 반환 타입은 Continuation의 반환 타입 U에 따라 결정됩니다:

  • Continuation이 Future<T2,E2>을(를) 반환하면 Future<T2,E2>(으)로의 암시적 언패킹이 수행됩니다 [SWS_CORE_00337].
  • Continuation이 Result<T2,E2>을(를) 반환하면 이 역시 암시적으로 Future<T2,E2>(으)로 확인됩니다 [SWS_CORE_00337].
  • 그 밖의 모든 경우에는 호출이 Future<U,E>을(를) 반환합니다 [SWS_CORE_00337].

동시성 및 수명 주기

메서드 호출이 반환된 직후 원래의 Future 인스턴스는 유효하지 않게 됩니다(valid() == false) [SWS_CORE_00337]. 이 함수는 스레드 안전하지 않은 것으로 선언되어 있습니다 [SWS_CORE_00337]. 등록된 Continuation은 새로 반환된 Future에서 관리됩니다. 해당 소멸자의 실행이 완료된 후에는 더 이상 Continuation을 시작할 수 없습니다. 이미 실행 중인 동작은 완료될 때까지 진행되므로 소멸자가 블록될 수 있습니다 [SWS_CORE_00337].

오류 처리 및 상호 작용

표준화된 오류 코드는 정의되어 있지 않습니다 [SWS_CORE_00337]. 유효하지 않은 인스턴스에서 호출하면 위반 사항 FutureInvalidViolation이(가) 발생합니다 [SWS_CORE_00337]. Continuation이 예외를 던지면 이는 FutureContinuationHasThrownViolation(으)로 이어지므로 예외를 포착하여 ara::core::Result 또는 ara::core::Future을(를) 통해 오류로 전달해야 합니다 [SWS_CORE_00337]. 실행 컨텍스트가 없는 오버로드 [SWS_CORE_00331]과(와) 달리 이 변형은 전달된 Executor에서의 실행을 강제합니다. void 결과 타입에 대해서는 유사한 특수화 [SWS_CORE_06237]이(가) 존재합니다.

이 사용 지침은 AUTOSAR Adaptive R25-11 사양을 기반으로 합니다.

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

Template-Parameter

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

Parameter (in)

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

Rückgabewert

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

Fehler

FehlercodeBeschreibung
This function does not specify any standardized errors.

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

Record
AUTOSAR/AP/record/SWS_CORE_00337
Status
valid/unmigrated
Version
AUTOSAR/AP/record/SWS_CORE_00337@rel:R25-11#ddf6a388
Content hash
ddf6a388
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.

AI 생성 미검증 모델: 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]과(와) 같은 호출 작업이 유효하지 않은 상태(valid() == false)일 때 FutureInvalidViolation을(를) 발생시키기 때문입니다. 이전에 유효했던 Future은(는) get() [SWS_CORE_00326] 또는 GetResult() [SWS_CORE_00336]을(를) 통해 결과가 소비되거나 then() [SWS_CORE_00331], [SWS_CORE_00337]을(를) 통한 추가 처리가 등록되는 즉시 자동으로 유효하지 않게 됩니다.

이 텍스트는 AI에 의해 작성되었으며 참고용으로 제공됩니다. 구속력 있는 것은 링크된 AUTOSAR 사양뿐입니다.

구현자 가이드 준비 중 (복잡도 I1)

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

Rückgabewert

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

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

Record
AUTOSAR/AP/record/SWS_CORE_00327
Status
valid/unmigrated
Version
AUTOSAR/AP/record/SWS_CORE_00327@rel:R25-11#0d810878
Content hash
0d810878
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

AI 생성 미검증 모델: gemini-3.8-flash-medium · 노력: medium · 온도: 제어 불가 · 프롬프트: 9635b0074677 출처
독일어 가이드에서 번역됨gemini-3.8-flash-low · 2026-10-13 · 독일어 원문

ara::core::Future 클래스의 wait 멤버 함수는 비동기 작업으로부터 결과값이나 오류를 사용할 수 있을 때까지 호출 스레드를 동기식으로 차단합니다[SWS_CORE_00328]. 이 함수는 매개변수를 받지 않고 반환값을 제공하지 않으며, 명세에 따라 std::future [SWS_CORE_00328]의 해당 함수와 유사하게 동작합니다. 템플릿 특수화 ara::core::Future<void, E> [SWS_CORE_06228]에도 동일한 동작이 적용됩니다.

오류 처리 및 동시성과 관련하여 다음 요구사항이 정의되어 있습니다:

  • 오류 조건: 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#a2522f63
Content hash
a2522f63
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.

AI 생성 미검증 모델: gemini-3.8-flash-medium · 노력: medium · 온도: 제어 불가 · 프롬프트: 360b2640b7ed 출처 열린 질문 (1)
독일어 가이드에서 번역됨gemini-3.8-flash-low · 2026-10-13 · 독일어 원문

사용

클래스 ara::core::Future의 멤버 함수 wait_for은 전달받은 시간 범위 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과 달리 열거형 FutureStatus에는 deferred에 대한 항목이 존재하지 않습니다 [SWS_CORE_00361].

이 텍스트는 AUTOSAR 사양 R25-11을 기반으로 AI에 의해 생성되었습니다.

구현자 가이드 준비 중 (복잡도 I1)

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

Parameter (in)

ParameterBeschreibung
timeoutDurationmaximal duration to wait for

Rückgabewert

TypBeschreibung
FutureStatusStatus that indicates whether the timeoutDuration expired or if a value is available

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

Record
AUTOSAR/AP/record/SWS_CORE_00329
Status
valid/unmigrated
Version
AUTOSAR/AP/record/SWS_CORE_00329@rel:R25-11#4868f017
Content hash
4868f017
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.

AI 생성 미검증 모델: 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].

이 텍스트는 AI에 의해 작성되었으며 참고용으로 제공됩니다. 사양이 표준입니다.

구현자 가이드 준비 중 (복잡도 I1)

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

Parameter (in)

ParameterBeschreibung
deadlinelatest point in time to wait

Rückgabewert

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

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

Record
AUTOSAR/AP/record/SWS_CORE_00330
Status
valid/unmigrated
Version
AUTOSAR/AP/record/SWS_CORE_00330@rel:R25-11#88326089
Content hash
88326089
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#ede1e7dc
Content hash
ede1e7dc
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