Fix comment
authorHans Fugal <fugalh@fb.com>
Wed, 4 Feb 2015 21:03:26 +0000 (13:03 -0800)
committerSara Golemon <sgolemon@fb.com>
Wed, 11 Feb 2015 02:01:59 +0000 (18:01 -0800)
Summary: It is true. Also, add a useful message about which thread this Future will complete in.

Test Plan: it should still compile

Reviewed By: davejwatson@fb.com

Subscribers: trunkagent, exa, folly-diffs@, jsedgwick, yfeldblum

FB internal diff: D1819849

Tasks: 57052866008465

Signature: t1:1819849:1423074012:79bf11c877eb2f061cb5d07f7ab45fa4cc4a894b

folly/futures/Future.h

index a97ebfd4e19cc31b4eb6b1be53d0972074967a59..174631323a1bb13ee0b285f133fcd785fdb26ca4 100644 (file)
@@ -527,8 +527,10 @@ Future<void> via(Executor* executor);
   The Futures are moved in, so your copies are invalid. If you need to
   chain further from these Futures, use the variant with an output iterator.
 
   The Futures are moved in, so your copies are invalid. If you need to
   chain further from these Futures, use the variant with an output iterator.
 
-  XXX is this still true?
-  This function is thread-safe for Futures running on different threads.
+  This function is thread-safe for Futures running on different threads. But
+  if you are doing anything non-trivial after, you will probably want to
+  follow with `via(executor)` because it will complete in whichever thread the
+  last Future completes in.
 
   The return type for Future<T> input is a Future<std::vector<Try<T>>>
   */
 
   The return type for Future<T> input is a Future<std::vector<Try<T>>>
   */