Set interrupt handler correctly on SharedPromise
authorViswanath Sivakumar <viswanath@fb.com>
Thu, 5 Nov 2015 11:48:26 +0000 (03:48 -0800)
committerfacebook-github-bot-1 <folly-bot@fb.com>
Thu, 5 Nov 2015 12:20:21 +0000 (04:20 -0800)
commit8cb94e9bfc9df742defff3d3d91b58ea8938c345
tree3ea7e071aea3fafdf5db1ff3a7f8982c05f2d38d
parent8f06296efe2460dd6166e65d0d5fcd187c5163d6
Set interrupt handler correctly on SharedPromise

Summary: If SharedPromise::getFuture() is invoked after a call to setInterruptHandler,
then the interrupt handler isn't set on the newly created promise. This diff
fixes that.

Reviewed By: yfeldblum

Differential Revision: D2610289

fb-gh-sync-id: bf8fce9e881b83ccac17d13c6788ec2afd0b0153
folly/futures/SharedPromise-inl.h
folly/futures/SharedPromise.h
folly/futures/test/SharedPromiseTest.cpp