Test in a separate thread

asked 2019-11-18 12:14:32 -0600

piscvau gravatar image

updated 2019-11-18 13:57:58 -0600

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?

edit retag flag offensive close merge delete

Comments

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

Wingware Support gravatar imageWingware Support ( 2019-11-18 13:57:35 -0600 )edit

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

piscvau gravatar imagepiscvau ( 2019-11-19 09:21:12 -0600 )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 gravatar imageWingware Support ( 2019-11-19 11:13:47 -0600 )edit