From: Hans Fugal Date: Wed, 4 Feb 2015 21:03:26 +0000 (-0800) Subject: Fix comment X-Git-Tag: v0.25.0~20 X-Git-Url: http://plrg.eecs.uci.edu/git/?p=folly.git;a=commitdiff_plain;h=b674132278a2b2b5e49a75d49bf8f8c9cc47ddad Fix comment 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: 5705286, 6008465 Signature: t1:1819849:1423074012:79bf11c877eb2f061cb5d07f7ab45fa4cc4a894b --- diff --git a/folly/futures/Future.h b/folly/futures/Future.h index a97ebfd4..17463132 100644 --- a/folly/futures/Future.h +++ b/folly/futures/Future.h @@ -527,8 +527,10 @@ Future 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. - 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 input is a Future>> */