Parallel Event With A Condition: Does it stop running as soon as the Condition is turned off?

This actually makes a difference in my game, but I am not sure how to test this accurately and confidently.

Essentially, if I have a Parallel Map Event running with a Switch for a condition and I turn that Switch off, does the Event stop running in the middle of the Event or does it stop running when it gets to the end of the Event and would start over again?

Similar question but from the perspective of a large Common Event that is running in Parallel.

I tried to search for this, but it is a lot of criteria and I wasn't having much luck. And I don't sufficiently understand how the engine/interpreter/magic thingy in the background actually works.

If anyone can explain this with a definitive answer, that would be awesome because I may or may not have to change some Events based on this answer.

I need to know if the Event could end up stopping at a point that could cause a problem if it doesn't finish a particular part.

Thanks!
seems like it ends the event immediately. I made a map parallel event with a switch condition that just prints different text boxes with a wait in between. it doesnt try to finish the page when i kill the switch
@Robro33 Thanks for that example! If that is the way it works, I won't have to change anything in my Event.

I am trying to account for the extremely rare chance that the Event could get turned off right in the middle of updating a couple of things and not finish, which would cause problems. So I am handling those updates after I turn the Switch for the Event off.
does the Event stop running in the middle of the Event or does it stop running when it gets to the end of the Event and would start over again?
neither

the parallels are handled in the main game loop, and a parallel event is removed from the loop itself once the condition changes.
However it depends on where the event is when that happens.

if a different event changed the condition and the event itself is not running, it will not be processed again.
if the condition was changed inside the parallel event itself it depends on the command given - the current command will always be completed, but if the next command is processed or not partially depends on the command. In most cases the next command will not be processed, but in special cases it still might be. For example it becomes a bit tricky if the command that changes the condition is not an event command but part of a script command box.
And on restart the event will always start from the beginning even if it had not been completed before.

you might want to follow the link to "bughunting" in my signature because I explained the game loop and the effects of parallels there as well.
Thanks @Andar ! I will refresh my memory with the bug hunting resource since it has been a while.

If I am interpreting what you said above correctly, I think my Parallel Map Event will be removed as soon as the Switch is turned off from a Common Event that runs.

So my game has very few Map Events. I only have 7 right now (with multiple Event pages), but I have hundreds of Common Events that are running all the time, depending on where the player is clicking.

So this particular Parallel Map Event is randomly changing the BGM that is playing after X amount of minutes. The Map Event is turned on by a Common Event and gets turned off by a Common Event. Based on the player clicking on an ON/OFF Button.

So it sounds like that Parallel Map Event playing the BGM will get removed from the game loop as soon as the condition Switch is turned off by the Common Event.

Again, I will take another look at the Bug Hunting resource and thanks!
Is the player clicking on the keyboard, or on a map event or picture? I ask this because in the second case, there might not be a need for a parallel event
@ISC My Sudoku game uses primarily pictures that the player clicks on. In fact, I just had to increase my permissible picture count to 500 to accommodate everything.
According to the code the map will not refresh until next update loop.
JavaScript:
Game_Map.prototype.update = function(sceneActive) {
    this.refreshIfNeeded();
    if (sceneActive) {
        this.updateInterpreter();
    }
    this.updateScroll();
    this.updateEvents();
    this.updateVehicles();
    this.updateParallax();
};

As you can see the map refresh before event and script update.

Original thread: https://forums.rpgmakerweb.com/threads/parallel-event-with-a-condition-does-it-stop-running-as-soon-as-the-condition-is-turned-off.172245/