When a script calls an external function and passes one of its variables to that function, does this result in the function parameter being immediately passed or put onto the stack along with the function call, or does the passing of the variable have to wait for the queue to "accept" it?
An example will probably make my question clearer:
Weapon weapEvent OnObjectEquipped(Form baseObj, ObjectReference ref) weap = baseObj as Weapon externalWeaponFunction(weap)EndEvent
In the example above, will the current "weap" always be passed to externalWeaponFunction in a threadsafe manner? Or will this thread have to wait before passing the parameter, in which case it would seem "weap" could be changed by a subsequent OnObjectEquipped event, before it actually gets passed to externalWeaponFunction.
I would imagine it's possible for the whole function call including its parameter to be put on the stack to wait in the thread queue, but I'm not sure if that's how it works or not.