Reset optional after moving its value out in Future::Wait

This commit is contained in:
Tyler Neely 2022-07-04 11:55:18 +00:00
parent 0ef1f7eb5d
commit cb70431301

View File

@ -80,7 +80,8 @@ class Shared {
MG_ASSERT(!consumed_, "MgFuture consumed twice!");
}
T ret = *std::move(item_);
T ret = std::move(item_).value();
item_.reset();
consumed_ = true;