Thread Descriptions in Diagnostics Menu

Hi,

how can i set the “Description” Field of a Thread, started via →

system.util.invokeAsynchronous(partial(function, data))

Is it also somehow possible to read the Elapsed Time and abort the thread via script if a specific interval has been reached?

Thanks for youre answers :slight_smile:

br,
Roland

For the first request, changes are coming soon - possibly as soon as 8.0.15. Right now, there’s no way to set that description, but there will just be a description keyword argument to provide on your system.util.invokeAsynchronous calls.

For the latter:

from com.inductiveautomation.ignition.common.script import ScriptManager

for script in ScriptManager.executingScripts():
	if script.description == "My Async Thread":
		ScriptManager.interrupt(script.threadId)
1 Like

:slight_smile:

1 Like

Works perfectly :slight_smile: Thanks for fast solution (also the partial / args part )