Listeners and Threads

Hi, I’m using this code to unsubscribe the listeners in a module:

tagManager.unsubscribe(paths, listeners) // where paths and listeners are lists

The problem is tha when I restart the module new threads appear in the consolo/threads. There is a way to remove threads of listeners when this happens?

Why do you want to remove those threads? These threads are created automatically by the system itself. The threads will exist even if you have no listeners registered? Or maybe I am not understanding?

The problem is that when I update a module with listeners with new code involving these listeners, I happens that the old code are running at the same time. That is for example that I write a memory tag every 10 seconds and then I have two threads modifying that tag alternatively. I tried to restart Ignition to stop this behavior but didn’t have luck with this either. It is like there is a cache of the module and the old code that it is not in the new module anymore keeps running.