I have a loop while
that ends only when I press the q key, then the program quits. Within this loop , at a certain time or condition, I start a thread that takes a few 10 seconds to execute.
My problem is, if I exit the loop by pressing q with a running thread , it is canceled.
I would like the loop / script to wait for the thread to run, and then end the program. Is that possible?
Thank you.