As far as I understand, Python scripts run on the gateway. Suppose a button in a Perspective view starts a long running script, after which I have to update a property of the view: since the Python script runs on the gateway, my UI experience is fluid, even while that script is running. What's then the purpose of a system.util.invokeAsynchronousand system.util.invokeLater calls in that case? What should I care of, when a button starts a long running script in a Perspective view?
This will return the event handler immediately and move the work to another thread. This prevents the sessions's scripting request being held open. So if you have a script doing a bunch of things, and you want to spin off one part of the thing while letting the rest of the things finish, you'd use this.
This adds complexity, though, because if you have a button smasher (like myself, I super smash bros UI buttons), you have to add protections to keep the calls from stacking up. Something like:
system.util.invokeAsynchronous is also available everywhere on the gateway. It's extremely relevant to, say, a tag event script, to be able to move an expensive script off the extremely limited queue (as long as it's done carefully).
It's also generally a useful tool, programmatically, to be able to say "continue working on this task while my primary execution continues".