Are threads bad? - was: Future of Pypy?

Ian Kelly ian.g.kelly at gmail.com
Wed Feb 25 01:02:12 EST 2015


On Tue, Feb 24, 2015 at 10:54 PM, Chris Angelico <rosuav at gmail.com> wrote:
> On Wed, Feb 25, 2015 at 4:46 PM, Marko Rauhamaa <marko at pacujo.net> wrote:
>> Marcos Almeida Azevedo <marcos.al.azevedo at gmail.com>:
>>
>>> Synchronized methods in Java really makes programming life simpler.
>>> But I think it is standard practice to avoid this if there is a
>>> lighter alternative as synchronized methods are slow. Worse case I
>>> used double checked locking.
>>
>> I have yet to see code whose performance suffers from too much locking.
>> However, I have seen plenty of code that suffers from anomalies caused
>> by incorrect locking.
>
> Uhh, I have seen *heaps* of code whose performance suffers from too
> much locking. At the coarsest and least intelligent level, a database
> program that couldn't handle concurrency at all, so I wrote an
> application-level semaphore that stopped two people from running it at
> once. You want to use that program? Ask the other guy to close it.
> THAT is a performance problem. And there are plenty of narrower cases,
> where it ends up being a transactions-per-second throughput limiter.

Is the name of that database program "Microsoft Access" perchance?



More information about the Python-list mailing list