Lets say i have a trigger named "executor" which changes the value of a variable "x" when called and many other triggers that calls "executor" when their specific events are fired.
Okay
Quote:
Since (afaik) you can't set a normal trigger to run as a thread,...
Like Molsterr already pointed out, each time a trigger is executed, it starts its own, new thread.
Quote:
...what happens if lets say "a lot" of triggers calls "executor" in the very same moment, or close enough that "executor" is still dealing with the first caller? Is there any sort of queue to prevent the other calls to be lost? How big it is (if there is)?
There is no such thing as the very same moment when running starcraft. Starcraft always handles one thing after another (don't mention multi core cpus, yes they do things simultaneously, but thats a whole different story actually). The game handles each trigger execution separately; one after another. Nothing gets lost. (There are some assumptions; too many events triggered at once should cause events to malfunction, but until I have seen proof, these are nothing but rumors)
If too many actions are queued up, the game will slow down to allow the code execution to keep up (usually resulting in lag spikes or something)
Quote:
Another similar problem, if i have a trigger with a lot of events, what happen if many of them are fired in the very same moment, or as before close enough so that the trigger is still managing the first event?
Again, not possible. The trigger will finish the first event, then work the second. If too much stuff happens to be handled smoothly, the game will slow down.
Quote:
I hope i have explained my question clearly enough!
I think so ;)
In case I misinterpreted something, notify me.
Hey
Okay
Like Molsterr already pointed out, each time a trigger is executed, it starts its own, new thread.
There is no such thing as the very same moment when running starcraft. Starcraft always handles one thing after another (don't mention multi core cpus, yes they do things simultaneously, but thats a whole different story actually). The game handles each trigger execution separately; one after another. Nothing gets lost. (There are some assumptions; too many events triggered at once should cause events to malfunction, but until I have seen proof, these are nothing but rumors)
If too many actions are queued up, the game will slow down to allow the code execution to keep up (usually resulting in lag spikes or something)
Again, not possible. The trigger will finish the first event, then work the second. If too much stuff happens to be handled smoothly, the game will slow down.
I think so ;)
In case I misinterpreted something, notify me.
You are welcome.