std::shared_future<T>:: shared_future
From cppreference.net
<
cpp
|
thread
|
shared future
C++
Concurrency support library
|
|
|||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
std::shared_future
| Member functions | ||||
|
shared_future::shared_future
|
||||
| Getting the result | ||||
| State | ||||
|
shared_future
(
)
noexcept
;
|
(1) | (desde C++11) |
| (2) | ||
|
shared_future
(
const
shared_future
&
other
)
;
|
(desde C++11)
(hasta C++17) |
|
|
shared_future
(
const
shared_future
&
other
)
noexcept
;
|
(desde C++17) | |
|
shared_future
(
std::
future
<
T
>
&&
other
)
noexcept
;
|
(3) | (desde C++11) |
|
shared_future
(
shared_future
&&
other
)
noexcept
;
|
(4) | (desde C++11) |
Construye un nuevo
shared_future
.
1)
Constructor por defecto. Construye un shared future vacío, que no hace referencia a un estado compartido, es decir
valid
(
)
==
false
.
2)
Construye un futuro compartido que hace referencia al mismo estado compartido, si existe, que
other
.
3,4)
Transfiere el estado compartido mantenido por
other
a
*
this
. Después de la construcción,
other.
valid
(
)
==
false
, y
this
-
>
valid
(
)
retorna el mismo valor que
other.
valid
(
)
habría retornado antes de la construcción.
Parámetros
| otro | - | otro objeto futuro con el que inicializar |