fix race handling bug in futures interrupt-handler
Summary: Setting the interrupt-handler races with setting the interrupt-exception. This is expected to occur on occasion and should be handled in both `setInterruptHandler` and `raise`. The latter is correct but the former has a bug when, if the race happens, a moved-from interrupt-handler is invoked. The fix is to be sure to invoke a non-moved-from handler. For consistency, always performs precisely one copy or move of the handler and always invokes the handler as an lvalue-ref-to-non-const. Reviewed By: iahs Differential Revision: D29974165 fbshipit-source-id: faf083e97c042fda0622801fc94bbc6fbca910fd
Showing
Please register or sign in to comment