Commit ba7c9b40 authored by Taiyuan Zhang's avatar Taiyuan Zhang Committed by Facebook Github Bot 2

fix cancelAllFunctions

Summary: as titled. When I tried re-adding all functions after cancelAllFunctions, it throws error. This is because it doesn't reset currentFunction to null.

Reviewed By: jjs0

Differential Revision: D3209237

fb-gh-sync-id: 5b6e2d967fc3c0986320d23b8d61eb1bfbff8940
fbshipit-source-id: 5b6e2d967fc3c0986320d23b8d61eb1bfbff8940
parent e9a22fbd
......@@ -223,6 +223,7 @@ void FunctionScheduler::cancelFunction(const std::unique_lock<std::mutex>& l,
void FunctionScheduler::cancelAllFunctions() {
std::unique_lock<std::mutex> l(mutex_);
functions_.clear();
currentFunction_ = nullptr;
}
bool FunctionScheduler::resetFunctionTimer(StringPiece nameID) {
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment