Test in a separate thread

Hello I am running a test for a module which starts a new thread. When the test is terminated, I stop the thread but the test appears in the testing tool as not being terminated. Is there a better way to stop the test?

piscvau's avatar
486
piscvau
asked 2019-11-18 12:14:32 -0500
Wingware Support's avatar
4k
Wingware Support
updated 2019-11-18 13:57:58 -0500
edit flag offensive 0 remove flag close merge delete

Comments

Can you post a small example? My guess is the thread is exiting but not the parent.

Wingware Support's avatar Wingware Support (2019-11-18 13:57:35 -0500) edit

Hello Here is as short as I could do. https://dpaste.de/smxT# thanks for your help

piscvau's avatar piscvau (2019-11-19 09:21:12 -0500) edit

Thanks, although it's not something I can easily run because of I don't have the serial hardware you're using. The test seems to wait for _result() to be called five times but it is never called, as far as I can tell, so the parent would sit in the while True indefinitely after the LockReader thread completes.

Wingware Support's avatar Wingware Support (2019-11-19 11:13:47 -0500) edit
add a comment see more comments