This is my code :
queue=Queue.Queue()
isbn=str(9789382711056)
thread1= Thread(target = amazon, args=[isbn,queue])
thread2= Thread(target = bookadda, args=[isbn,queue])
thread3= Thread(target = infibeam, args=[isbn,queue])
def jo():
thread1.join()
thread2.join()
thread3.join()
thread1.start()
thread2.start()
thread3.start()
jo()
And each of those functions put a list in the queue ( queue.put(list) ). Code for one of the function:
def infibeam(isbn,queue):
#b_price and b_avail are obtained from some where else
blist =[b_price,b_avail]
queue.put(blist)
The other methods are also similar to this.
I get all the lists in the queue , but how can I know which method has returned which list ? Please help me. This might be a very silly question, but I am new to python. Thanks in Advance.