Permite esperar la finalización de una operación asíncrona sin valor de retorno, así como la extracción del estado de error.
GENERADO POR IAno revisadoModelo: gemini-3.8-flash-medium · Esfuerzo: medium · Temperatura: no controlable · Prompt: e943c154e07eProcedencia
traducido de la guía alemanagemini-3.8-flash-low · 2026-10-13 · Original en alemán
Permite esperar la finalización de una operación asíncrona sin valor de retorno, así como la extracción del estado de error.
La clase ara::core::Future<void, E> permite la sincronización asíncrona y la comprobación de errores de operaciones sin valor de retorno en AUTOSAR Adaptive [SWS_CORE_06236]. Como tipo no copiable, permite esperar a la finalización, así como la recuperación de resultados a prueba de excepciones como ara::core::Result<void, E>[SWS_CORE_06236] o el procesamiento posterior asíncrono mediante una función de continuación [SWS_CORE_06231]. Tras extraer el resultado, el estado compartido se invalida, de modo que las invocaciones posteriores sin un estado válido constituyen una infracción [SWS_CORE_06236].
Contexto
La especialización de clase plantilla ara::core::Future<void, E> representa el extremo receptor de una operación asíncrona en AUTOSAR Adaptive que, al finalizar con éxito, no devuelve ningún valor, sino que señala puramente el acaecimiento del evento o un error producido. Conforme a la descripción de la clase, la implementación debe responder a la condición E != ara::core::ErrorCode con un error de compilación. La clase interactúa típicamente con un ara::core::Promise correspondiente que llena el estado compartido (shared state) [SWS_CORE_06236], así como con contextos de ejecución asíncronos al registrar funciones de continuación [SWS_CORE_06237].
Ciclo de vida
Las instancias de ara::core::Future<void, E> son objetos puramente con semántica de movimiento: el constructor de copia [SWS_CORE_06234] y el operador de asignación por copia [SWS_CORE_06235] están eliminados (delete). Un objeto creado mediante el constructor por defecto no posee estado compartido y se comporta de manera análoga a std::future[SWS_CORE_06222]. Mediante construcción por movimiento [SWS_CORE_06223] o asignación por movimiento [SWS_CORE_06225], una instancia asume la propiedad de un shared state procedente de otra instancia.
El ciclo de vida está marcado en gran medida por la condición del shared state. Mediante el método valid() se puede comprobar si la instancia está vinculada a un shared state y, por tanto, puede utilizarse [SWS_CORE_06227]. En cuanto el resultado se recupera mediante GetResult()[SWS_CORE_06236] o get()[SWS_CORE_06226], o se registra una continuación mediante then()[SWS_CORE_06231], el objeto Future pierde su shared state y valid() devuelve false. El destructor libera cualquier estado compartido remanente [SWS_CORE_06233]. En lo relativo a la concurrencia, las operaciones de comprobación y destrucción tales como valid()[SWS_CORE_06227], is_ready()[SWS_CORE_06232] y el destructor [SWS_CORE_06233] son seguras para subprocesos (thread-safe), mientras que las operaciones que modifican el estado como GetResult()[SWS_CORE_06236], get()[SWS_CORE_06226] y las funciones de espera [SWS_CORE_06228] no son seguras para subprocesos.
En la vía de uso síncrona, un consumidor espera a que finalice la operación asíncrona. Con is_ready() se puede consultar con bajo bloqueo si se dispone de un valor o de un error [SWS_CORE_06232]. Como alternativa, se puede esperar de forma bloqueante mediante wait()[SWS_CORE_06228], o por un tiempo limitado mediante wait_for()[SWS_CORE_06229] y wait_until()[SWS_CORE_06230]. Si el resultado está disponible, la consulta del valor se realiza preferentemente a prueba de excepciones mediante GetResult(), devolviéndose un ara::core::Result<void, E>[SWS_CORE_06236].
En la vía asíncrona, el método then() permite el registro de una función de continuación (continuation), que se ejecuta tan pronto como se disponga del resultado [SWS_CORE_06231]. En este proceso puede transferirse opcionalmente un contexto de ejecución (executor) [SWS_CORE_06237]. La continuación recibe el Result<void, E> como rvalue. El tipo de retorno de then() desempaqueta automáticamente los tipos Future o Result anidados (unwrapping) [SWS_CORE_06231].
Si se invoca una operación dependiente del estado (como GetResult(), is_ready(), wait(), wait_for(), wait_until() o then()) sobre una instancia no válida (valid() == false), se produce una infracción de precondición que se trata como FutureInvalidViolation[SWS_CORE_06228], [SWS_CORE_06229], [SWS_CORE_06230], [SWS_CORE_06231], [SWS_CORE_06232], [SWS_CORE_06236], [SWS_CORE_06237]. Al invocar get() sobre una instancia no válida, se desencadena en su lugar una FutureException con el código de error kNoState[SWS_CORE_06226]; get() no participa en la resolución de sobrecargas cuando las excepciones C++ están desactivadas [SWS_CORE_06226].
Si la promesa correspondiente se destruyó o abandonó el estado compartido sin establecer un resultado ni un error explícito, el código de error FutureErrc::kBrokenPromise se deposita en el shared state con arreglo a [SWS_CORE_00400][SWS_CORE_06226], [SWS_CORE_06236]. GetResult() devuelve este código como error en Result<void, E>[SWS_CORE_06236]. Si una continuación registrada en then() lanza una excepción que no implementa una infracción, esto conduce a FutureContinuationHasThrownViolation[SWS_CORE_06231], [SWS_CORE_06237].
Esta guía se basa exclusivamente en la especificación AUTOSAR para ara::core::Future<void, E> en la Release R25-11.
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_
Sobrecargasthen2
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).
GENERADO POR IAno revisadoModelo: gemini-3.8-flash-medium · Esfuerzo: medium · Temperatura: no controlable · Prompt: 195e9e272b48Procedencia
traducido de la guía alemanagemini-3.8-flash-low · 2026-10-13 · Original en alemán
La función miembro get de la especialización ara::core::Future<void, E> sirve para esperar el resultado de una operación asíncrona sin valor de retorno ([SWS_CORE_06226]). Se comporta como la función correspondiente de std::future y bloquea al llamante hasta que el resultado o un error esté disponible ([SWS_CORE_06226], [SWS_CORE_00336]). Tras la llamada, la instancia de future pierde su validez, de modo que rige valid() == false ([SWS_CORE_06226]).
La función está declarada como no segura contra excepciones (not exception safe) ([SWS_CORE_06226]). Si se registró un error en el Promise vinculado, se lanza una excepción correspondiente ([SWS_CORE_06226]). Si el estado compartido se abandonó prematuramente, se produce el código de error kBrokenPromise conforme a [SWS_CORE_00400] ([SWS_CORE_06226]). Si se ejecuta get sobre una instancia que ya no es válida, la función lanza una FutureException con el código de error kNoState ([SWS_CORE_06226]).
En lo relativo a la concurrencia, el método no es seguro entre hilos (not thread-safe) ([SWS_CORE_06226]). Por lo tanto, los accesos paralelos al mismo objeto requieren sincronización externa. Además, la función no participa en la resolución de sobrecargas si las excepciones de C++ están desactivadas en la toolchain del compilador ([SWS_CORE_06226]).
En interacción con funciones afines, [SWS_CORE_00332] (is_ready) garantiza que get seguro que no bloquea si la operación ya ha finalizado. Para contextos sin excepciones, AUTOSAR ofrece como alternativa [SWS_CORE_00336] (GetResult), el cual notifica los errores a través de un tipo de resultado en lugar de lanzar excepciones.
Este texto ha sido generado por una IA y sirve de guía orientativa; el texto vinculante es la especificación 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.
GENERADO POR IAno revisadoModelo: gemini-3.8-flash-medium · Esfuerzo: medium · Temperatura: no controlable · Prompt: 161f9bad96abProcedencia
traducido de la guía alemanagemini-3.8-flash-low · 2026-10-13 · Original en alemán
usar
El método then registra una operación de continuación (continuation func) en una instancia de ara::core::Future<void, E>[SWS_CORE_06231]. El objeto invocable recibe el resultado de la operación como una expresión rvalue del tipo Result<void, E>, el cual se proporciona internamente a través de GetResult[SWS_CORE_06231]. La llamada a func puede tener lugar de forma síncrona en el contexto de then o de forma asíncrona en el contexto de Promise::set_value(), Promise::SetError() o en otro punto [SWS_CORE_06231].
Inmediatamente después del retorno de then, el Future original no es válido (valid() == false) [SWS_CORE_06231]. El tipo de retorno se adapta al tipo de retorno U de la continuación:
Si func devuelve un Future<T2, E2>, se produce un desempaquetado implícito y then devuelve Future<T2, E2>[SWS_CORE_06231].
Si func devuelve un Result<T2, E2>, este también se desempaqueta implícitamente a Future<T2, E2>[SWS_CORE_06231].
En todos los demás casos, el tipo de retorno es Future<U, E>[SWS_CORE_06231].
Tratamiento de errores y condiciones límite
No se especifican códigos de error estandarizados para esta función [SWS_CORE_06231]. El método está declarado como noexcept, pero define dos violaciones (violations):
FutureInvalidViolation: Se produce si el método se invoca en un Future no válido (si valid() devuelve false) [SWS_CORE_06231].
FutureContinuationHasThrownViolation: Se produce si la continuación lanza una excepción que no implementa ninguna violation [SWS_CORE_06231]. En su lugar, los errores en la continuación deben devolverse empaquetados en un Result o Future[SWS_CORE_06231].
Concurrencia e interacción
El método no es seguro para hilos (not thread-safe) [SWS_CORE_06231]. Tras el retorno del destructor del Future devuelto ya no se ejecuta ninguna continuación registrada; sin embargo, una ejecución que ya esté en curso se completa, de modo que el destructor puede bloquear [SWS_CORE_06231]. Mientras que [SWS_CORE_06231] se aplica a Future<void, E>, [SWS_CORE_00331] describe la variante para Futures tipados Future<T, E> y [SWS_CORE_06237] la sobrecarga con ejecutor explícito.
Este texto ha sido generado por una IA a partir de la especificación de AUTOSAR.
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.
GENERADO POR IAno revisadoModelo: gemini-3.8-flash-medium · Esfuerzo: medium · Temperatura: no controlable · Prompt: 96d3b0e93b60Procedencia
traducido de la guía alemanagemini-3.8-flash-low · 2026-10-13 · Original en alemán
La función then registra un objeto invocable de continuación (continuation) func en una instancia de ara::core::Future<void, E> para su ejecución en el contexto de ejecución indicado executor[SWS_CORE_06237]. Inmediatamente después del retorno de then, la instancia de future llamadora pierde su validez, de modo que es valid() == false[SWS_CORE_06237]. La continuación recibe el resultado de la instancia de future original pasado como Result<void, E> en forma de expresión rvalue [SWS_CORE_06237]. Como valor de retorno, la llamada proporciona una nueva instancia de Future, donde los tipos de retorno de la continuación de tipo Future<T2, E2> o Result<T2, E2> se desempaquetan implícitamente a Future<T2, E2>; de lo contrario, se devuelve un Future<U, E>[SWS_CORE_06237].
En relación con la concurrencia y el ciclo de vida, la función está especificada como no segura para subprocesos (not thread-safe) [SWS_CORE_06237]. La continuación se registra en el nuevo future devuelto. Tras el retorno del destructor de este nuevo future, ya no se podrá ejecutar ninguna continuación; no obstante, una continuación que ya esté en ejecución se completará en su totalidad, por lo que el destructor del future puede bloquearse [SWS_CORE_06237].
La función no declara códigos de error estandarizados y está definida como noexcept[SWS_CORE_06237]. Si se invoca sobre una instancia de future no válida, se produce la violación FutureInvalidViolation[SWS_CORE_06237]. En caso de que la continuación lance una excepción, esto da lugar a la violación FutureContinuationHasThrownViolation[SWS_CORE_06237]. Las excepciones no deben salir de la continuación, sino que, si es necesario, deben traducirse en valores de error y devolverse dentro de un Result o Future[SWS_CORE_06237]. La función complementa la variante sin ejecutor [SWS_CORE_06231] y constituye la contraparte de las sobrecargas con valor [SWS_CORE_00331] y [SWS_CORE_00337].
Esta nota de uso ha sido elaborada por una IA y se basa en la especificación AUTOSAR R25-11.
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.
GENERADO POR IAno revisadoModelo: gemini-3.8-flash-medium · Esfuerzo: medium · Temperatura: no controlable · Prompt: 480112e5c811Procedencia
traducido de la guía alemanagemini-3.8-flash-low · 2026-10-13 · Original en alemán
La función valid() comprueba de forma síncrona si la instancia de ara::core::Future<void, E> posee un estado compartido (Shared State) y, por tanto, es utilizable [SWS_CORE_06227]. Se comporta según la especificación de manera análoga a la función correspondiente de std::future[SWS_CORE_06227]. Como valor de retorno, devuelve true si el future es utilizable, y false si no es utilizable [SWS_CORE_06227].
En cuanto a la concurrencia y el tratamiento de errores, el método está declarado como noexcept, seguro frente a excepciones (exception safe) y explícitamente especificado como seguro para subprocesos (thread-safe) [SWS_CORE_06227]. Por lo tanto, puede invocarse de manera segura desde contextos concurrentes.
En combinación con otras operaciones, valid() sirve para salvaguardar el ciclo de vida:
Si en un objeto future no válido (valid() == false) se invoca una operación como wait()[SWS_CORE_06228] o is_ready()[SWS_CORE_00332], esto desencadena la infracción FutureInvalidViolation.
Las operaciones consumidoras invalidan el objeto: tras una llamada a get(), el future ya no es válido, por lo que las comprobaciones posteriores con valid() devuelven el valor false[SWS_CORE_06226].
Del mismo modo, los reenvíos mediante then()[SWS_CORE_00331] o las llamadas a GetResult()[SWS_CORE_00336] hacen que el objeto future original se invalide de inmediato.
Esta nota de uso ha sido generada por una IA sobre la base de la especificación.
Wait for a value or an error to be available. This function shall behave the same as the corresponding std::future function
GENERADO POR IAno revisadoModelo: gemini-3.8-flash-medium · Esfuerzo: medium · Temperatura: no controlable · Prompt: 2f9ee5ecd1d4ProcedenciaPreguntas abiertas (1)
traducido de la guía alemanagemini-3.8-flash-low · 2026-10-13 · Original en alemán
La función miembro wait de la especialización ara::core::Future<void, E> bloquea el hilo llamante de forma síncrona hasta que el resultado de la operación asíncrona esté disponible en forma de un valor o de un error [SWS_CORE_06228]. La función no toma parámetros, no devuelve ningún valor de retorno (void) y, conforme a la especificación, se comporta como la función correspondiente de std::future[SWS_CORE_06228].
Con respecto al tratamiento de errores y las condiciones de contorno se aplican los siguientes requisitos:
Seguridad frente a excepciones y tratamiento de errores: La operación está declarada con noexcept y especificada como segura frente a excepciones (exception safe) [SWS_CORE_06228]. Si valid() devuelve para la instancia de Future false, se produce la violación FutureInvalidViolation[SWS_CORE_06228]. Es de esperar que la consecuencia concreta de esta violación esté implementada como un tratamiento de errores específico del sistema del entorno de ejecución de AUTOSAR. Pregunta Q-469e9abc947b9869 (abierta)
Concurrencia: La función está clasificada como no segura para hilos (not thread-safe) [SWS_CORE_06228]. Por tanto, no se permite el acceso concurrente al mismo objeto Future sin sincronización externa.
En interacción con las demás funciones del módulo core existen las siguientes posibilidades:
Con el método seguro para hilos is_ready se puede consultar de antemano si la operación ha finalizado; si se devuelve true, se garantiza que wait ya no bloqueará [SWS_CORE_06232].
Para evitar un bloqueo indefinido están disponibles las funciones con límite de tiempo wait_for con una duración relativa [SWS_CORE_06229], así como wait_until con un punto temporal absoluto [SWS_CORE_06230].
Para la clase plantilla primaria ara::core::Future se aplican los mismos requisitos de espera síncrona y restricciones [SWS_CORE_00328].
Este texto ha sido seleccionado por un sistema de IA y se basa exclusivamente en la especificación AUTOSAR.
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
GENERADO POR IAno revisadoModelo: gemini-3.8-flash-medium · Esfuerzo: medium · Temperatura: no controlable · Prompt: 927a98d78cf3ProcedenciaPreguntas abiertas (1)
traducido de la guía alemanagemini-3.8-flash-low · 2026-10-13 · Original en alemán
El método wait_for de la especialización ara::core::Future<void, E> bloquea el subproceso llamador de forma síncrona durante un periodo de tiempo máximo timeoutDuration o hasta que el resultado esté disponible [SWS_CORE_06229]. Se comporta semánticamente como la función estándar correspondiente std::future::wait_for[SWS_CORE_06229].
Como valor de retorno, la función proporciona el estado FutureStatus[SWS_CORE_06229]. Este señala con FutureStatus::kReady que un valor o un error está disponible, o bien con FutureStatus::kTimeout que el plazo ha expirado sin resultado [SWS_CORE_00361]. No se prevé un estado equivalente a std::future_status::deferred[SWS_CORE_00361]. El comportamiento se corresponde con la interfaz general de futuros [SWS_CORE_00329].
Para la llamada se aplican las siguientes condiciones respecto a la concurrencia y al tratamiento de errores:
Concurrencia: la función está especificada como no segura para subprocesos (not thread-safe) [SWS_CORE_06229]. Las llamadas simultáneas sobre la misma instancia deben protegerse por parte del llamador.
Casos de error y seguridad frente a excepciones: la operación está declarada como segura frente a excepciones (exception safe), así como noexcept[SWS_CORE_06229]. Si el objeto Future no es válido (valid() devuelve false), se produce una FutureInvalidViolation[SWS_CORE_06229]. Debido a la declaración noexcept, es de suponer que esta violación conducirá a la finalización inmediata del programa. Pregunta Q-4f01aa6e7fbfb12d (abierta)
Esta nota de uso se ha generado de forma automatizada sobre la base de la especificación de 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.
GENERADO POR IAno revisadoModelo: gemini-3.8-flash-medium · Esfuerzo: medium · Temperatura: no controlable · Prompt: 932b0d674f17Procedencia
traducido de la guía alemanagemini-3.8-flash-low · 2026-10-13 · Original en alemán
La función miembro wait_until de la especialización ara::core::Future<void, E> bloquea el subproceso llamador hasta que se alcance el momento absoluto especificado deadline o hasta que haya disponible un valor o un error [SWS_CORE_06230]. La función muestra el mismo comportamiento que la correspondiente función estándar de C++ std::future::wait_until[SWS_CORE_06230] y posee la misma semántica que la sobrecarga genérica para ara::core::Future[SWS_CORE_00330].
El valor de retorno de tipo FutureStatus indica si se ha alcanzado el plazo o si hay un valor disponible [SWS_CORE_06230]. En este contexto, el estado kReady indica que el estado compartido está listo, mientras que kTimeout significa que el estado compartido no estuvo listo antes de que venciera el plazo [SWS_CORE_00361]. En FutureStatus no existe un estado análogo a std::future_status::deferred[SWS_CORE_00361].
En lo que respecta a la ejecución y a las condiciones límite, se definen las siguientes especificaciones:
Contexto de llamada y comportamiento ante excepciones: la función está disponible a través del archivo de cabecera #include "ara/core/future.h", declarada como noexcept y especificada como segura frente a excepciones (exception safe) [SWS_CORE_06230].
Estados de error: si el future no es válido, es decir, si valid() devuelve el valor false, se produce la violación FutureInvalidViolation[SWS_CORE_06230].
Concurrencia: la operación está clasificada como no segura para subprocesos (not thread-safe) [SWS_CORE_06230].
Esta nota de uso se ha generado automáticamente a partir de la especificación de AUTOSAR Adaptive R25-11.
gemini-3.8-flash-low· 2026-10-13 · Original en alemán