Threading Termination

I am just starting with threading and although I have it working in my simple test, I’m apparently doing something wrong in handling termination. I have a very simple test:

import frontPanel as FP
import threading

if __name__=='__main__':

This runs as expected until the thread terminates. At that point I get this error:

Tcl_AsyncDelete: async handler deleted by the wrong thread

The thread script displays a GUI using tkinter. When I close that window that script simply ends. What am I doing wrong that causes that error? TIA.

I’m on mobile, so I can’t easily check documentation for frontpanel. Regardless, the target argument to threading.Thread must be a callable (eg function or class), and you can pass its arguments into the args parameter. Try running


Now I understand. That was it. Thanks.