Python Forum
Need help with threads in for loop
Thread Rating:
  • 3 Vote(s) - 4 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Need help with threads in for loop
#2
I have the suspicion that your code is taking an exceedingly long time due to a bug. The GetMyThread.__init__() method is running the matrix loop. Properly, that loop should be in the GetMyThread.run() method instead. I say this because you later call the thread.join() method and that method listens for the termination of the thread.run() method according to the documentation. If the thread.run() method isn't being used, thread.join() should not work. In turn, that means that you have a thread running and the program isn't stopping to collect its data.

Also, I don't see any mechanism for collecting the data from the thread.
Reply


Messages In This Thread
Need help with threads in for loop - by yestoprince - Jan-11-2019, 12:35 PM
RE: Need help with threads in for loop - by stullis - Jan-11-2019, 02:30 PM

Possibly Related Threads…
Thread Author Replies Views Last Post
  Trying to separate a loop across multiple threads stylingpat 0 2,137 May-05-2021, 05:21 PM
Last Post: stylingpat

Forum Jump:

User Panel Messages

Announcements
Announcement #1 8/1/2020
Announcement #2 8/2/2020
Announcement #3 8/6/2020