Skip to content

Commit

Permalink
logging: move clear memory flag to correct place
Browse files Browse the repository at this point in the history
  • Loading branch information
krypdkat committed Jan 16, 2025
1 parent 2bb191b commit 7801c8b
Showing 1 changed file with 8 additions and 7 deletions.
15 changes: 8 additions & 7 deletions src/qubic.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -3019,6 +3019,14 @@ static void endEpoch()

assetsEndEpoch();

#if PAUSE_BEFORE_CLEAR_MEMORY
epochTransitionCleanMemoryFlag = 0;
while (epochTransitionCleanMemoryFlag == 0) // wait until operator flip this flag to 1 to continue the beginEpoch procedures
{
_mm_pause();
}
#endif

system.epoch++;
system.initialTick = system.tick;

Expand Down Expand Up @@ -4915,13 +4923,6 @@ static void tickProcessor(void*)
}
epochTransitionState = 2;

#if PAUSE_BEFORE_CLEAR_MEMORY
epochTransitionCleanMemoryFlag = 0;
while (epochTransitionCleanMemoryFlag == 0) // wait until operator flip this flag to 1 to continue the beginEpoch procedures
{
_mm_pause();
}
#endif
beginEpoch();
setNewMiningSeed();

Expand Down

0 comments on commit 7801c8b

Please sign in to comment.