2

I was wondering how in Python I can start a function that is dependant on two different functions completing that are running in their own threads?

So for example:

Thread 1 is running

Thread 4 is running

When thread 1 finishes, but thread 4 has not finished

then wait

When thread 4 finishes, but thread 1 has not finished

then wait

If both thread 1 and 4 finished,

run this.

Jonathan
  • 2,183
  • 4
  • 20
  • 25
  • I reviewed that answer, but I am not waiting on all threads to finish, just 2 specific ones that are the prerequisites for the third. – Jonathan Dec 31 '16 at 10:56
  • So, could you provide more details on what you have tried ? – J. Piquard Dec 31 '16 at 10:58
  • 2
    The answer @Daniel is pointing seems to provide the answer, as you can use Thread.join() for your two specific threads. If this is still not what you needed to know, it would be easier if you would provide additional information. – René Jahn Dec 31 '16 at 11:00

0 Answers0