[Python-Dev] New PEP: 319

Skip Montanaro skip@pobox.com
Mon, 16 Jun 2003 10:38:37 -0500


Missed this on the first read:

    Michel> with explicit locks programmers will forget, or become confused,
    Michel> with when and how to explicitly lock and unlock.  'synchronize'
    Michel> locks at the beginning of the block and unlocks at the end.
    Michel> There is no forgetting.

You still need to remember to 'synchronize' access to the data.  That's the
bigger problem in my mind.

It seems to me that the more locks I need to manage, the harder it will be
to identify potential deadlock situations.  With fewer locks (I use five
RLock objects and a Queue in my XML-RPC server) I think it's easier to
compartmentalize functionality in my feeble brain and avoid deadlock, with
some potential loss of execution overlap.

Skip