mirror of
https://github.com/facebook/sapling.git
synced 2024-10-08 15:57:43 +03:00
d71a100be2
Summary: This is part of "the great r-valuification of folly::Future": * This is something we should do for safety in general. * Context: `Future::get(...)` means both `Future::get()` and `Future::get(Duration)` * Using lvalue-qualified `Future::get(...)` has caused some failures around D7840699 since lvalue-qualification hides that operation's move-out semantics - leads to some use of future operations that are really not correct, but are not obviously incorrect. * Problems with `Future::get(...) &`: it moves-out the result but doesn't invalidate the Future - the Future remains (technically) valid even though it actually is partially moved-out. Callers can subsequently access that moved-out result via things like `future.get(...)`, `future.result()`, `future.value()`, etc. - these access an already-moved-out result which is/can be surprising. * Reasons `Future::get(...) &&` is better: its semantics are more obvious and user-testable. It moves-out the Future, leaving it with `future.valid() == false`. Reviewed By: yfeldblum Differential Revision: D8711368 fbshipit-source-id: fbfcb731097cdf9d8d98583956bc7fe614157a6b |
||
---|---|---|
.. | ||
test | ||
FakeBackingStore.cpp | ||
FakeBackingStore.h | ||
FakeClock.h | ||
FakeFuse.cpp | ||
FakeFuse.h | ||
FakeObjectStore.cpp | ||
FakeObjectStore.h | ||
FakePrivHelper.cpp | ||
FakePrivHelper.h | ||
FakeTreeBuilder.cpp | ||
FakeTreeBuilder.h | ||
HgRepo.cpp | ||
HgRepo.h | ||
StoredObject.h | ||
TestChecks.h | ||
TestDispatcher.cpp | ||
TestDispatcher.h | ||
TestMount.cpp | ||
TestMount.h | ||
TestUtil.cpp | ||
TestUtil.h |