# Start stop of async process?

**URL:** <https://forum.inductiveautomation.com/t/start-stop-of-async-process/90938>\
**Category:** Ignition\
**Tags:** python, ignition81, vision, scripting\
**Created:** [May 27, 2024, 8:14am UTC](https://forum.inductiveautomation.com/t/start-stop-of-async-process/90938 "2024-05-27T08:14:29Z")\
**Posts on this page:** 1\
**Showing post:** 5

<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:** [May 27, 2024, 2:07pm UTC](https://forum.inductiveautomation.com/t/start-stop-of-async-process/90938/5 "2024-05-27T14:07:19Z")

</div>

You want to use the techniques described in 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() …

(And follow the links in that topic to related discussions.)

Always keep in mind that the only safe thing to do with a Java Swing object in a background thread is to carry it around, to pass back to a short foreground function.

---

_[View the full topic](https://forum.inductiveautomation.com/t/start-stop-of-async-process/90938)._
