How Tag Change Scripts execute scripts?

Hello everyone! Hope you are having a good day.

We currently have a Tag Change Script that execute some logic. However, we are having issues so I have some questions about how it works.

Inside the same Tag Change Script we have 15 tags. As I understand, if all of those are in the same script, it only generates 1 scripts as it says in the wiki.

When executing, each Tag Change Script runs in a separate thread.

However, if 2 of those tags change, it will execute 2 times the script or only 1 time the script?

Also, the wiki says this:

They also provide a guaranteed way to make sure only a single execution of a particular script occurs at a time, [...].

This means that if 2 tags in the same script change with a difference of 0,500s but the script takes longer to execute.. it will block it or simply executes the script in another thread?

Our fear is that if all of those 15 tags change in a really short time it could generate 15 threads that could overload the system. That could mess some other things, because the logic writes in some tags and in the bd.

Summarazing the question, how does the tag event script executes when a bunch of tags are inside of it?

Thanks in advance for the help!

The script will execute 15 times, in a row, using only 1 thread at most at a time.

2 Likes

Perfect. Exactly what we need.

Thank you @Kevin.Herron!