# Invoke Asynchronous Completion from Another Vision Window

**URL:** <https://forum.inductiveautomation.com/t/invoke-asynchronous-completion-from-another-vision-window/61875>\
**Category:** Ignition\
**Tags:** ignition81, vision\
**Created:** [July 13, 2022, 8:12pm UTC](https://forum.inductiveautomation.com/t/invoke-asynchronous-completion-from-another-vision-window/61875 "2022-07-13T20:12:21Z")\
**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:** [July 14, 2022, 12:25am UTC](https://forum.inductiveautomation.com/t/invoke-asynchronous-completion-from-another-vision-window/61875/2 "2022-07-14T00:25:50Z")

</div>

You would move your multiple queries to a background thread and then use invokeLater to report progress and delivery data back to the foreground. Swing has single-threading rules you must respect. See this topic:

> [@Update GUI via Asynchronous thread](https://forum.inductiveautomation.com/t/update-gui-via-asynchronous-thread/9666):
>
> I’ve got a script I am experimenting with that can take a lot of time to execute, so I now use the system.util.invokeAsynchronous to run the script in a separate thread to keep the GUI from locking up. I am using the asynchronous thread to copy files from one place to another, and I would like to show the progress of the file copy with a progress bar. How would I go about this? I am importing a few python libraries to do this. import shutil def fileTransfer(): path = system.file.openFile() …

---

_[View the full topic](https://forum.inductiveautomation.com/t/invoke-asynchronous-completion-from-another-vision-window/61875)._
