I run some code inside a thread (A). At the end of that thread it creates another thread (B). Now what i want to do is at the end of thread B, i need to call thread A. when i do
_threadA.start() from thread B system says: Thred alread started.
how to fix this?
You have to understand the life cycle of threads; after a thread is started it can not be restarted – the same applies for a stopped thread, once it’s stopped its life cycle is over. Take a look at the linked article, in particular the state diagram will make things clear.