# Managing multiple asynchronous threads

**URL:** <https://forum.inductiveautomation.com/t/managing-multiple-asynchronous-threads/37185>\
**Category:** Ignition\
**Created:** [July 29, 2020, 1:50pm UTC](https://forum.inductiveautomation.com/t/managing-multiple-asynchronous-threads/37185 "2020-07-29T13:50:58Z")\
**Posts on this page:** 1\
**Showing post:** 6

<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 31, 2020, 7:23pm UTC](https://forum.inductiveautomation.com/t/managing-multiple-asynchronous-threads/37185/6 "2020-07-31T19:23:48Z")

</div>

No, more like this:

```auto
persist = system.util.persistent("someUniqueConstantName")
oldFileWatcher = persist.pop("fw")
persist['fw'] = FileWatcher(oldFileWatcher)

def getWatcher():
    return persist['fw']

```

Note the oldFileWatcher passed to the new one so the new one’s thread can tell it to shut down.

---

_[View the full topic](https://forum.inductiveautomation.com/t/managing-multiple-asynchronous-threads/37185)._
