key error when use gevent monkey patch

It is indeed related to monkey-patching the threading module. In fact,
I can easily trigger the exception by importing the threading module
before monkey-patching threads.

http://stackoverflow.com/questions/8774958/keyerror-in-module-threading-
after-a-successful-py-test-run