I got some problem with two threads which do seem to deadlock
The idea is this:
p1 = threading.Thread(targest =myClass.setData, args = mylist)
p1.start()
p2 = threading.Thread(target = myClass.takeData, args = mylist)
p2.start()
mylist is a list.
Everything works absolutely fine when either the list is almost empty or when only either p1 or p2 is running. If both run, they seem to deadlock. I have tried to lock them - to no avail.
setData has an infinite while-loop which resets data in mylist, whereas takedata has an infinite whileloop which reads data from mylist.
Is it possible to do what I try to do?