Commit Graph

2 Commits

Author SHA1 Message Date
Lee Howes
e8e25257cf Future<T>::then Future<T>::then() -> Future<T>::thenValue or thenTry.
Summary:
Part of the larger project to modify Future<T>::then to be r-value qualified and use Future<T>::thenTry or Future<T>::thenValue.

The goal is to disambiguate folly::Future and to improve type and lifetime safety of Future and its methods.

Codemod:
  future<T>.then(callable with operator()(not-a-try)) to future<T>.thenValue(callable with operator()(not-a-try)).
  future<T>.then(callable with operator()()) to future<T>.thenValue(callable with operator()(auto&&)).
  future<T>.then(callable with operator()(auto)) to future<T>.thenValue(callable with operator()(auto)).
  future<T>.then(callable with operator()(folly::Try<T>)) to future<T>.thenTry(callable)

Reviewed By: Orvid

Differential Revision: D9819578

fbshipit-source-id: f9e31f47354c041ecbf0a90953cbe50ebfda6adc
2018-09-14 17:10:57 -07:00
Adam Simpkins
4ff8d15d18 move HgProxyHash to its own top-level file
Summary:
Move the HgProxyHash code out of HgImporter.cpp and into its own top-level
file.  This does not have any functional changes other than moving the code
around.

This will make it easier to perform HgProxyHash operation from inside
HgBackingStore.cpp.  Currently all of the HgProxyHash operations are done from
inside HgImporter threads.  This operation does not need to be done in the
importer threads however, and for operations like putBatch() that complete
asynchronously it generally should not be done from the HgImporter threads.

Reviewed By: wez

Differential Revision: D8438776

fbshipit-source-id: 344652f47e5ccdc6ef20b143dc52d0eeac2886e6
2018-06-14 22:02:38 -07:00