Fixed the code. It can work with gevent 1.0 and windows now.