Skip to content

Commit

Permalink
Merge pull request #4201 from Sonicadvance1/remove_lock
Browse files Browse the repository at this point in the history
FEXCore: Don't `WaitForEmptyJobQueue` if CodeObjectCacheService isn't used
  • Loading branch information
Sonicadvance1 authored Dec 9, 2024
2 parents bdae4f6 + 0a1ecdf commit 5a4691f
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions FEXCore/Source/Interface/Core/Core.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -366,7 +366,7 @@ void ContextImpl::HandleCallback(FEXCore::Core::InternalThreadState* Thread, uin
void ContextImpl::ExecuteThread(FEXCore::Core::InternalThreadState* Thread) {
Dispatcher->ExecuteDispatch(Thread->CurrentFrame);

{
if (CodeObjectCacheService) {
// Ensure the Code Object Serialization service has fully serialized this thread's data before clearing the cache
// Use the thread's object cache ref counter for this
CodeSerialize::CodeObjectSerializeService::WaitForEmptyJobQueue(&Thread->ObjectCacheRefCounter);
Expand Down Expand Up @@ -469,7 +469,7 @@ void ContextImpl::AddBlockMapping(FEXCore::Core::InternalThreadState* Thread, ui
void ContextImpl::ClearCodeCache(FEXCore::Core::InternalThreadState* Thread) {
FEXCORE_PROFILE_INSTANT("ClearCodeCache");

{
if (CodeObjectCacheService) {
// Ensure the Code Object Serialization service has fully serialized this thread's data before clearing the cache
// Use the thread's object cache ref counter for this
CodeSerialize::CodeObjectSerializeService::WaitForEmptyJobQueue(&Thread->ObjectCacheRefCounter);
Expand Down

0 comments on commit 5a4691f

Please sign in to comment.