# Update GUI via Asynchronous thread

**URL:** <https://forum.inductiveautomation.com/t/update-gui-via-asynchronous-thread/9666>\
**Category:** Ignition\
**Created:** [February 5, 2015, 9:41pm UTC](https://forum.inductiveautomation.com/t/update-gui-via-asynchronous-thread/9666 "2015-02-05T21:41:28Z")\
**Posts on this page:** 1\
**Showing post:** 11

<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:** [October 1, 2018, 10:33pm UTC](https://forum.inductiveautomation.com/t/update-gui-via-asynchronous-thread/9666/11 "2018-10-01T22:33:54Z")

</div>

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:

```auto
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 the invokeLater emulation should only use one thread. Fixed.

---

_[View the full topic](https://forum.inductiveautomation.com/t/update-gui-via-asynchronous-thread/9666)._
