\brief Producer API: instantiate a valid Future The Future's state is initialized with PENDING. If you are creating a future with this method you must ensure that future is eventually completed (with success or failure). Creating a future, returning it, and never completing the future can lead to memory leaks (for example, see Loop).
| 400 | /// failure). Creating a future, returning it, and never completing the future can lead |
| 401 | /// to memory leaks (for example, see Loop). |
| 402 | static Future Make() { |
| 403 | Future fut; |
| 404 | fut.impl_ = FutureImpl::Make(); |
| 405 | return fut; |
| 406 | } |
| 407 | |
| 408 | /// \brief Producer API: instantiate a finished Future |
| 409 | static Future<ValueType> MakeFinished(Result<ValueType> res) { |