[Python-ideas] Add faster locks to the threading module?

Antoine Pitrou solipsis at pitrou.net
Wed Jul 21 12:04:46 CEST 2010


On Wed, 21 Jul 2010 02:51:53 +0200
Sturla Molden <sturla at molden.no> wrote:
> 
> Thread synchronization with threading.Lock can be expensive. But 
> consider this: Why should the active thread need to aquire a mutex, when 
> it already holds one? That would be the GIL.

Do you have any data about supposed cost of threading.Lock (or RLock)?
There is no point in trying to optimize a perceived bottleneck if the
bottleneck doesn't exist.






More information about the Python-ideas mailing list