# 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:** 2

<div class="post-metadata">

**Author:** ![nmudge](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/nmudge/32/3394_2.png) [@nmudge](https://forum.inductiveautomation.com/u/nmudge)\
**Post date:** [February 5, 2015, 10:06pm UTC](https://forum.inductiveautomation.com/t/update-gui-via-asynchronous-thread/9666/2 "2015-02-05T22:06:20Z")

</div>

Define a function in your fileTransfer function that you call with system.util.invokeLater.

Example:

```auto
import shutil
label = event.source.parent.getComponent("Label")
def fileTransfer():
	path = system.file.openFile()
	newPath = "F:\NewFolder"
	shutil.copy2(path, newPath)
	def func():
		label.text = "Step one done"
	system.util.invokeLater(func)
system.util.invokeAsynchronous(fileTransfer)
```

Functions called with invokeLater are always run on the GUI thread so this is safe.

Best,

---

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