This sorta goes back to the discussions about knowing what event caused an action to be executed.
Say there's a defined event that gets triggered due to a state change in a plugin device. And that this particular device updates rapidly (possibly multiple times per second). And that the trigger for this event causes an Action for the same plugin to be called, with the same device as a parameter.
Now, as I understand it, this plugin has at least two threads running. One is executing runConcurrentThread(), another is running all the methods as called by the Indigo server. Both of these threads can access the same (?) device object. Not really the same one, as each gets a read-only copy of the object which it can refresh (server->plugin) or update (plugin->server) as needed.
Now, for the plugin to work properly, the Action that was called needs an identical copy of the device object as it existed when the Trigger was executed. Is this guaranteed? The plugin code is calling indigo.trigger.execute(trigger) from the same thread that is processing the incoming data and updating the states, so that should be safe. But what happens after the trigger is queued up on the server? Is that action processed, and the device object parameter copied, before the indigo.trigger.execute() call returns? Because the device state could change very soon after the plugin code is resumed.
Am I worried about nothing?