diff --git a/src/Amalgam/evaluablenode/EvaluableNodeManagement.cpp b/src/Amalgam/evaluablenode/EvaluableNodeManagement.cpp index 930bfefd..f4d255d9 100644 --- a/src/Amalgam/evaluablenode/EvaluableNodeManagement.cpp +++ b/src/Amalgam/evaluablenode/EvaluableNodeManagement.cpp @@ -181,7 +181,6 @@ void EvaluableNodeManager::CollectGarbage() //keep trying to acquire write lock to see if this thread wins the race to collect garbage Concurrency::WriteLock write_lock(memoryModificationMutex, std::defer_lock); - Concurrency::threadPool.ChangeCurrentThreadStateFromActiveToWaiting(); do { if(!RecommendGarbageCollection()) @@ -189,8 +188,6 @@ void EvaluableNodeManager::CollectGarbage() if(memory_modification_lock != nullptr) memory_modification_lock->lock(); - Concurrency::threadPool.ChangeCurrentThreadStateFromWaitingToActive(); - if(PerformanceProfiler::IsProfilingEnabled()) PerformanceProfiler::EndOperation(GetNumberOfUsedNodes()); @@ -206,15 +203,11 @@ void EvaluableNodeManager::CollectGarbage() if(memory_modification_lock != nullptr) memory_modification_lock->lock(); - Concurrency::threadPool.ChangeCurrentThreadStateFromWaitingToActive(); - if(PerformanceProfiler::IsProfilingEnabled()) PerformanceProfiler::EndOperation(GetNumberOfUsedNodes()); return; } - - Concurrency::threadPool.ChangeCurrentThreadStateFromWaitingToActive(); #endif //perform garbage collection