We have an application that triggers the execution of a query which can run for several seconds, and during that time we are showing a loading indicator by greying out certain UI components and displaying a spinning loading icon.
This was working well with the later.py library. We would call the named query via scripting in an asynchronous function (using later.callAsync), and then set the "is loading" component back to false, along with several other GUI components, using later.assignLater().
Well, I found out that Message Handler scripts will execute in a separate asynchronous thread. If I moved my query call from the callAsync function to a Message Handler, should I still be using later.assignLater() for the assignment of GUI components? Or can I assign a value directly since the message is executing in a separate thread? I'm having trouble understanding the difference between something executed from the callAsync, and something executed from a Message Handler.
Thanks in advance