Semaphore or what should I use?

Ville Vainio ville at
Wed Dec 1 15:24:12 CET 2004

>>>>> "Bastian" == Bastian Hammer <webmaster at> writes:

    Bastian> Now I have to make sure, that both threads are
    Bastian> synchronal, 1 thread edits something and the other is
    Bastian> blocked until the first thread is ready.

    Bastian> Isn´t it a good idea to do this with a semaphore?

Semaphore will do, but this is a classical use case for

There should be lots of stuff regarding locks (or more googleably,
"mutexes") on the net.

Ville Vainio

More information about the Python-list mailing list