I am looking for an answer on python threads lock behaviour.
So far, i have not managed to get an answer on #python, 
whatsup,#twisted,google...
If i have many threads running and there is a resource all want
to posses using a lock, i.e., lock.acquire().
one obviously is going to posses the lock.
My question is, when it is released using lock.release() which of the threads
is going to acquire the lock? is it a random process or
a FIFO order. I am trying to understand if starvation is possible
in this particular instance.

My other question, is what is more efficient:
using locks, conditions, events, queues. i.e. i am building
a server and i want to avoid unneccessary polling operations.
10x.

-- 
Regards,
        Tzahi.
--
Tzahi Fadida
Blog: http://tzahi.blogsite.org | Home Site: http://tzahi.webhop.info
WARNING TO SPAMMERS:  see at 
http://members.lycos.co.uk/my2nis/spamwarning.html

לענות