i've a problem with my code. it's a loop in which checks a list and if there are something in the list it will process that and remove them from list. the items inserted into the list by another thread continuously.
here is code in other thread:
for item in list:
It seems that the queue module will be useful for you. It implements multi-producer, multi-consumer queues and allows synchronize between threads without busy waiting.
see also Solution to producer and consumer problem in python which uses this