# InvokeLater varying Client Experience

**URL:** <https://forum.inductiveautomation.com/t/invokelater-varying-client-experience/45299>\
**Category:** Ignition\
**Tags:** scripting, database, ignition79, vision\
**Created:** [April 6, 2021, 1:50pm UTC](https://forum.inductiveautomation.com/t/invokelater-varying-client-experience/45299 "2021-04-06T13:50:19Z")\
**Posts on this page:** 1\
**Showing post:** 2

<div class="post-metadata">

**Author:** ![pturmel](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/pturmel/32/3295_2.png) [@pturmel](https://forum.inductiveautomation.com/u/pturmel)\
**Post date:** [April 6, 2021, 2:33pm UTC](https://forum.inductiveautomation.com/t/invokelater-varying-client-experience/45299/2 "2021-04-06T14:33:04Z")

</div>

Fixed time delays are a terrible solution for varying operational delays. Try something like the techniques from this topic:

> [@Update GUI via Asynchronous thread](http://forum.inductiveautomation.com/t/update-gui-via-asynchronous-thread/9666/11):
>
> OK. I’ve poked myself with the futures idea. Grab the latest version of [later.py](https://www.automation-pros.com/ignition/later.py), then try this: def asyncInvoked(): # do something in the background shared.later.callLater(system.gui.messageBox, "Please Press OK").get() # do something after OK is pressed system.util.invokeAsynchronous(asyncInvoked) Note the use of .get() to wait for system.gui.messageBox to complete. This updated later.py includes an emulation of invokeLater for gateway scope. Untested and unsupported! Edit: Realized…

Promises are roughly equivalent to Java's "CompletableFuture".

---

_[View the full topic](https://forum.inductiveautomation.com/t/invokelater-varying-client-experience/45299)._
