Have SemiFuture::within mark internal futures as consumed to avoid treating them as discarded.
Summary: SemiFuture::within creates two valid SemiFutures and promptly overwrites them, both discarding valid SemiFutures and wasting the core allocation. It later drops the updated versions without directly consuming them, instead stealing the deferred executors. This update initializes the two SemiFutures as empty, and safely terminates the chain with trivial callbacks so the SemiFutures can be treated as consumed. Reviewed By: yfeldblum Differential Revision: D21769500 fbshipit-source-id: eab13a78b17ecfc937b42c8d5e01e1292158d9ed
Showing
Please register or sign in to comment