Promise::setValue() for Unit
authorHans Fugal <fugalh@fb.com>
Mon, 27 Apr 2015 21:40:09 +0000 (14:40 -0700)
committerAndrii Grynenko <andrii@fb.com>
Wed, 29 Apr 2015 22:56:59 +0000 (15:56 -0700)
commitef0137ceaf11b0dce2b732797c480ccb9adb20b6
tree7259faceeb4b0c4eefed70196b733747250af427
parent0cfa7e4b5625749d2fc50d26afd24b7fd5b1136e
Promise::setValue() for Unit

Summary: Unit is a bit special because it's just something special to use instead of `Promise<void>`, so let's offer the same sugar that `Promise<void>` has (`p.setValue()` instead of `p.setValue(Unit())`)

Test Plan: New unit tests. Look, a pun!

Reviewed By: jsedgwick@fb.com

Subscribers: exa, folly-diffs@, jsedgwick, yfeldblum, chalfant, davejwatson, hannesr

FB internal diff: D2014139

Tasks: 6847876

Signature: t1:2014139:1430159950:1484ee420c6d7f0f794a546b78ef1601c2eec45c
folly/futures/Promise-inl.h
folly/futures/Promise.h
folly/futures/test/FutureTest.cpp