Donnerstag, 31. Dezember 2015

[Python] From Threads to ThreadPool to Gevent

A system test I wrote does many requests on a local server. The responses take from some to many seconds to arrive. IO-bound. I thought I should use threads for each request. All requests could start at the same time and when the results are in they could be evaluated. 
It worked. Lots of threads were created, did their work and died.
To many threads - one would say.
A threadpool should be a better way...

Donnerstag, 10. Dezember 2015


Tried to debug my code by inserting this line:
 import ipdb; ipdb.set_trace()
Got an error like this:
/usr/local/lib/python2.7/dist-packages/pkg_resources/ AttributeError

 E           AttributeError: _dep_map