-
Junlin Zhang authored
Summary: In FunctionScheduler, cancelFunction and cancelAllFunction will not wait for current running function, which will lead to segmentation fault if the function captures resource to be destructed right after calling cancelFunction or cancelAllFunction. This diff introduces cancelFunctionAndWait and cancelAllFunctionsAndWait, making it possible to wait for completion of current running function. Reviewed By: yfeldblum Differential Revision: D4324384 fbshipit-source-id: ac4b272894f753ef3bb175173f10d1ca20c17c41
2a7bf484