sapling/eden/fs/testharness
Marshall Cline d71a100be2 use rvalue-qual Future::get(): pass 5
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
2018-07-02 07:05:52 -07:00
..
test use rvalue-qual Future::get(): pass 5 2018-07-02 07:05:52 -07:00
FakeBackingStore.cpp fix FileInode::isSameAs() to correctly wait on Future completion 2018-06-13 01:20:39 -07:00
FakeBackingStore.h fix FileInode::isSameAs() to correctly wait on Future completion 2018-06-13 01:20:39 -07:00
FakeClock.h make Clock::getRealtime() const 2018-02-01 11:19:15 -08:00
FakeFuse.cpp standardize on std::chrono_literals 2018-05-18 16:51:15 -07:00
FakeFuse.h prevent FuseChannel from being destroyed with outstanding requests 2018-03-16 12:35:19 -07:00
FakeObjectStore.cpp prefetch file batch for hg import helper 2018-05-25 13:51:27 -07:00
FakeObjectStore.h prefetch file batch for hg import helper 2018-05-25 13:51:27 -07:00
FakePrivHelper.cpp add a privhelper call to set the log file 2018-06-18 17:22:18 -07:00
FakePrivHelper.h add a privhelper call to set the log file 2018-06-18 17:22:18 -07:00
FakeTreeBuilder.cpp fix FileInode::isSameAs() to correctly wait on Future completion 2018-06-13 01:20:39 -07:00
FakeTreeBuilder.h fix FileInode::isSameAs() to correctly wait on Future completion 2018-06-13 01:20:39 -07:00
HgRepo.cpp fix UnicodeEncodeErrors thrown from eden prefetch code 2018-06-13 19:37:04 -07:00
HgRepo.h fix UnicodeEncodeErrors thrown from eden prefetch code 2018-06-13 19:37:04 -07:00
StoredObject.h fix FileInode::isSameAs() to correctly wait on Future completion 2018-06-13 01:20:39 -07:00
TestChecks.h minor prefactoring split out from later diffs 2018-04-24 18:53:19 -07:00
TestDispatcher.cpp move folly/experimental/logging to folly/logging/ 2018-04-30 21:29:29 -07:00
TestDispatcher.h remove the fusell namespace 2018-03-19 17:01:52 -07:00
TestMount.cpp modernize Future::get(): 4/n = codemod to std::move for non-ptr exprs 2018-06-19 23:21:11 -07:00
TestMount.h Enabled additional compiler warnings in Eden. 2018-06-01 11:39:01 -07:00
TestUtil.cpp run clang-format across all C++ files 2017-11-03 16:02:03 -07:00
TestUtil.h run clang-format across all C++ files 2017-11-03 16:02:03 -07:00