# Question on stopping asynchronous threads in Ignition

**URL:** <https://forum.inductiveautomation.com/t/question-on-stopping-asynchronous-threads-in-ignition/70861>\
**Category:** Ignition\
**Tags:** python, perspective, vision, ignition81\
**Created:** [March 9, 2023, 7:50pm UTC](https://forum.inductiveautomation.com/t/question-on-stopping-asynchronous-threads-in-ignition/70861 "2023-03-09T19:50:41Z")\
**Posts on this page:** 1\
**Showing post:** 2

<div class="post-metadata">

**Author:** ![dkhayes117](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/dkhayes117/32/68344_2.png) [@dkhayes117](https://forum.inductiveautomation.com/u/dkhayes117)\
**Post date:** [March 9, 2023, 9:18pm UTC](https://forum.inductiveautomation.com/t/question-on-stopping-asynchronous-threads-in-ignition/70861/2 "2023-03-09T21:18:48Z")

</div>

This may not answer all your questions, but it is good advice.

> [@Managing multiple asynchronous threads](https://forum.inductiveautomation.com/t/managing-multiple-asynchronous-threads/37185/2):
>
> To manage long-running jython threads through scripting restarts, you need to: Place the thread object in a dictionary that retains its content through script restarts. I used to recommend the dictionary from system.util.getGlobals(), but that is no longer suitable. I created a free [Life Cycle Module](http://forum.inductiveautomation.com/t/system-util-getglobals-not-persisted-across-designer-save/33869/14) that provides such dictionaries going forward. Write the asynchronous function’s loop so that it regularly checks [Thread.interrupted()](https://docs.oracle.com/javase/8/docs/api/java/lang/Thread.html#interrupted--), particularly after any java I/O operations. Clean up …

---

_[View the full topic](https://forum.inductiveautomation.com/t/question-on-stopping-asynchronous-threads-in-ignition/70861)._
