fix folly::FunctionScheduler.cancelFunctionAndWait() hanging issue