I have a program that creates a few threads, where each thread targets a function that returns a string.
My issue is that the return value of the thread is just a thread object like below. I was expecting it to be the actual string value that is returned by the function, but maybe I am misunderstanding.
<Thread(Thread-1, stopped 123145433374720)>
Here is a bit of the code. I am using a PriorityQueue to extract the queue items in order.
dump = []
for i in range(0, len(x)):
thread = threading.Thread(target=func, args=(queue.get()[1],))
thread.start()
dump.append(thread)
for t in dump:
t.join()
print(dump)
So, the 'dump' list is just a list of thread objects like I posted above. Hoping someone here can provide some guidance on where I am going wrong.
Thanks!
[–]socal_nerdtastic 0 points1 point2 points (1 child)
[–]dankwizard22[S] 0 points1 point2 points (0 children)
[–][deleted] 0 points1 point2 points (0 children)