AI 생성미검증모델: 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]을(를) 통한 비동기 추가 처리를 허용합니다. 결과를 검색한 후에는 공유 상태(Shared State)가 무효화되므로 유효한 상태가 없는 후속 호출은 위반에 해당합니다 [SWS_CORE_06236].
컨텍스트
템플릿 클래스 특수화 ara::core::Future<void, E>은(는) 성공적으로 완료되어도 값을 반환하지 않고 순수하게 이벤트 발생 또는 발생한 오류만을 알리는 AUTOSAR Adaptive 비동기 작업의 수신자 측 엔드를 나타냅니다. 클래스 설명에 따라 구현은 조건 E != ara::core::ErrorCode을(를) 컴파일 오류로 처리해야 합니다. 이 클래스는 일반적으로 공유 상태(Shared State)를 채우는 해당 ara::core::Promise[SWS_CORE_06236] 및 후속 함수 등록 시의 비동기 실행 컨텍스트와 상호작용합니다 [SWS_CORE_06237].
동기 사용 경로에서 소비자는 비동기 작업이 완료되기를 기다립니다. 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].
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
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).
Return whether the asynchronous operation has finished. If this function returns true, get(), Get Result() and the wait calls are guaranteed not to block.
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_
오버로드then2
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
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
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
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).
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]
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).
AI 생성미검증모델: gemini-3.8-flash-medium · 노력: medium · 온도: 제어 불가 · 프롬프트: 195e9e272b48출처
독일어 가이드에서 번역됨gemini-3.8-flash-low · 2026-10-13 · 독일어 원문
특수화 ara::core::Future<void, E>의 멤버 함수 get은 반환값이 없는 비동기 작업([SWS_CORE_06226])의 결과를 대기하는 데 사용됩니다. 이 함수는 std::future의 해당 함수처럼 동작하며 결과 또는 오류가 준비될 때까지 호출자를 블록합니다([SWS_CORE_06226], [SWS_CORE_00336]). 호출 후 Future 인스턴스는 유효성을 상실하여 valid() == false이 적용됩니다([SWS_CORE_06226]).
동시성과 관련하여 이 메서드는 스레드 안전하지 않습니다(not thread-safe)([SWS_CORE_06226]). 따라서 동일한 객체에 대한 병렬 접근에는 외부 동기화가 필요합니다. 또한 컴파일러 툴체인에서 C++ 예외가 비활성화된 경우 이 함수는 오버로드 확인에 참여하지 않습니다([SWS_CORE_06226]).
관련 함수들과의 상호작용에서 [SWS_CORE_00332](is_ready)은 작업이 이미 완료된 경우 get가 블록되지 않음을 보장합니다. 예외가 없는 컨텍스트를 위해 AUTOSAR는 예외를 던지는 대신 결과 타입을 통해 오류를 보고하는 대안으로 [SWS_CORE_00336](GetResult)을 제공합니다.
이 텍스트는 AI에 의해 생성되었으며 참고용으로 제공됩니다. 구속력 있는 것은 AUTOSAR 사양입니다.
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.
Return whether the asynchronous operation has finished. If this function returns true, get(), Get Result() and the wait calls are guaranteed not to block.
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.
AI 생성미검증모델: gemini-3.8-flash-medium · 노력: medium · 온도: 제어 불가 · 프롬프트: 161f9bad96ab출처
독일어 가이드에서 번역됨gemini-3.8-flash-low · 2026-10-13 · 독일어 원문
사용
메서드 then은 ara::core::Future<void, E> 인스턴스에 후속 작업(Continuation func)을 등록합니다 [SWS_CORE_06231]. 호출 가능한 객체는 작업의 결과를 Result<void, E> 타입의 rvalue 표현식으로 받으며, 이는 내부적으로 GetResult를 통해 제공됩니다 [SWS_CORE_06231]. func의 호출은 then의 컨텍스트에서 동기식으로 발생하거나 Promise::set_value(), Promise::SetError()의 컨텍스트에서 또는 다른 위치에서 비동기식으로 발생할 수 있습니다 [SWS_CORE_06231].
then에서 반환된 직후 원래의 Future는 유효하지 않게 됩니다(valid() == false) [SWS_CORE_06231]. 반환 타입은 Continuation의 반환 타입 U에 맞춰 조정됩니다:
이 함수에는 표준화된 오류 코드가 지정되어 있지 않습니다 [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를 사용하는 오버로드를 설명합니다.
FutureInvalidVio- If the Future is invalid (valid returns false) lation FutureContinua- If the continuation throws an exception tionHasThrownVio- lation
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.
AI 생성미검증모델: gemini-3.8-flash-medium · 노력: medium · 온도: 제어 불가 · 프롬프트: 96d3b0e93b60출처
독일어 가이드에서 번역됨gemini-3.8-flash-low · 2026-10-13 · 독일어 원문
함수 then은 지정된 실행 컨텍스트 executor에서 실행되도록 ara::core::Future<void, E>의 인스턴스에 호출 가능한 연속 작업 객체(Continuation) func을 등록합니다 [SWS_CORE_06237]. then가 반환된 직후 호출한 Future 인스턴스는 유효성을 상실하므로 valid() == false이 됩니다 [SWS_CORE_06237]. 연속 작업은 원래 Future 인스턴스의 결과를 rvalue 표현식 형태의 Result<void, E>로 전달받습니다 [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].
FutureInvalidVio- If the Future is invalid (valid returns false) lation FutureContinua- If the continuation throws an exception. tionHasThrownVio- lation
Template-Parameter
Parameter
Beschreibung
FExecutorT
the type of the func argument the type of the executor argument
Parameter (in)
Parameter
Beschreibung
func
a callable to register
executor
the execution context in which to execute the Callable func
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 · 온도: 제어 불가 · 프롬프트: 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]. 반환값으로 Future가 사용 가능한 경우 true을(를), 사용 불가능한 경우 false을(를) 반환합니다 [SWS_CORE_06227].
동시성 및 오류 처리와 관련하여 이 메서드는 noexcept(으)로 선언되고, 예외 안전(exception safe)하며, 명시적으로 스레드 안전(thread-safe)한 것으로 규정되어 있습니다 [SWS_CORE_06227]. 따라서 동시성 컨텍스트에서도 안전하게 호출될 수 있습니다.
다른 연산과의 상호 작용에서 valid()은(는) 수명 주기 보호 역할을 합니다:
유효하지 않은 Future 객체(valid() == false)에서 wait()[SWS_CORE_06228] 또는 is_ready()[SWS_CORE_00332]과(와) 같은 연산이 호출되면 FutureInvalidViolation 위반이 발생합니다.
소비하는 연산은 객체를 무효화합니다. get() 호출 후에는 Future가 더 이상 유효하지 않으므로, valid()을(를) 사용한 후속 검사는 false 값을 산출합니다 [SWS_CORE_06226].
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 · 온도: 제어 불가 · 프롬프트: 2f9ee5ecd1d4출처열린 질문 (1)
독일어 가이드에서 번역됨gemini-3.8-flash-low · 2026-10-13 · 독일어 원문
특수화 ara::core::Future<void, E>의 멤버 함수 wait은 값 또는 오류 형태의 비동기 작업 결과가 준비될 때까지 호출 스레드를 동기식으로 블록합니다 [SWS_CORE_06228]. 이 함수는 매개변수를 받지 않고 반환값을 제공하지 않으며(void), 사양에 따라 std::future의 해당 함수와 동일하게 동작합니다 [SWS_CORE_06228].
오류 처리 및 제약 조건과 관련하여 다음 요구 사항이 적용됩니다:
예외 안전성 및 오류 처리: 이 작업은 noexcept(으)로 선언되어 있으며 예외 안전(exception safe)으로 명시되어 있습니다 [SWS_CORE_06228]. Future 인스턴스에 대해 valid()가 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 the given period, 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 · 온도: 제어 불가 · 프롬프트: 927a98d78cf3출처열린 질문 (1)
독일어 가이드에서 번역됨gemini-3.8-flash-low · 2026-10-13 · 독일어 원문
특수화 ara::core::Future<void, E>의 메서드 wait_for은 최대 시간 범위 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 명세를 바탕으로 자동 작성되었습니다.
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.
AI 생성미검증모델: gemini-3.8-flash-medium · 노력: medium · 온도: 제어 불가 · 프롬프트: 932b0d674f17출처
독일어 가이드에서 번역됨gemini-3.8-flash-low · 2026-10-13 · 독일어 원문
특수화 ara::core::Future<void, E>의 멤버 함수 wait_until은 지정된 절대 시점 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 사양을 바탕으로 자동 생성되었습니다.
gemini-3.8-flash-low· 2026-10-13 · 독일어 원문