I have a queue in which i have to use it in several threads, so is it necessary to acquire the thread lock to avoid conflicts while processing this single queue, because i know it is necessary to acquire thread lock for variables or other resources, but little confused for queues.
thanks
If you use the Queue in the module Queue, it will take care of the locking for you. See this page for more information: http://docs.python.org/library/queue.html (“The Queue class in this module implements all the required locking semantics.”)