CPython thread starvation

Paul Rubin no.email at nospam.invalid
Sat Apr 28 00:20:48 EDT 2012


John Nagle <nagle at animats.com> writes:

> The code that stored them looked them up with "getaddrinfo()", and
> did this while a lock was set.

Don't do that!!

>    Added a local cache in the program to prevent this.
> Performance much improved.

Better to release the lock while the getaddrinfo is running, if you can.



More information about the Python-list mailing list