◐ Shell
clean mode source ↗

std::future::share – cppreference.com

Aus cppreference.com

<metanoindex/>

<tbody> </tbody>

std::shared_future<T> share();

Transfers auf den freigegebenen Zustand *this einer std::shared_future Objekt. Mehrere std::shared_future Objekte können auf die gleiche gemeinsamen Staat, der nicht mit std::future möglich .

Original:

Transfers the shared state of *this to a std::shared_future object. Multiple std::shared_future objects may reference the same shared state, which is not possible with std::future.

The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.

Nach dem Aufruf share auf einem std::future, valid() == false .

Original:

After calling share on a std::future, valid() == false.

The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.

Parameter

(None)

Original:

(none)

The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.

Rückgabewert

A std::shared_future Objekt mit dem gemeinsamen Staat zuvor von *this statt

Original:

A std::shared_future object containing the shared state previously held by *this

The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.

Beispiel

Siehe auch

wartet auf einen Wert (eventuell von anderen Futures verwiesen wird), die asynchron ist

Original:

waits for a value (possibly referenced by other futures) that is set asynchronously

The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.


(Klassen-Template) [edit]