Question about Reloading the KM Engine

@peternlewis - Let's say I have a macro with only these actions:

Why does this work? What I mean is, why does the "Display Text" action work? I would think if the engine was "reloaded", it would stop any currently executing macros. But obviously it doesn't.

What gives? What kind of genius resides behind the curtain?

Hey Dan,

The sdef for reload in both the engine and the editor says:

ā€œReload macrosā€

It says nothing about actually reloading (restarting) the engine or the editor ā€“ nor anything about interrupting the execution stack.

Peter Iā€™m sure will provide a more precise answer though, and I look forward to reading it.

-Chris

Actually, Chris, thatā€™s perfect. I hadnā€™t thought to look there.

This is indeed the behavior I am seeing, so I just wanted to make sure.

Thanks!

1 Like

Correct. Basically the ā€œreloadā€ command is the same thing the editor does to tell the engine when it has made a change to the macros, and similar to what the engine does to tell the editor when the macros are updated via syncing.

When you trigger a macro, a copy of that macro is sent off to be executed. If you change the macros after that, it has no affect on the executing macro.

Note that this is not some sort of ā€œdeepā€ copy - if the executing macro itself uses Execute Macro actions, then those would change behaviour if the sub-macros were reloaded with changed macros.

2 Likes