A minor gripe (seperate from all my other gripes, which other people have already talked about):
"...run code in another thread - sometimes there is no alternative - eg. getaddrinfo(), database connections"
Just thought I'd mention that async-supporting DNS libs do exist (eg. gevent ships with C-ares), and in particular I've used async postgres database connections in both C and gevent. The code to gevent-ise psycopg2 connections is about 10 or 15 lines, iirc.
"...run code in another thread - sometimes there is no alternative - eg. getaddrinfo(), database connections"
Just thought I'd mention that async-supporting DNS libs do exist (eg. gevent ships with C-ares), and in particular I've used async postgres database connections in both C and gevent. The code to gevent-ise psycopg2 connections is about 10 or 15 lines, iirc.