Issue #806 resolved

Move dead thread detection

Robert Brewer
created an issue

wsgiserver does the following on ThreadPool.put:



    # Remove any dead threads from our list
    for t in self._threads:
        if not t.isAlive():


This can be expensive to do on every put if you have a lot of threads. It should be moved to occur less frequently.

Comments (4)

  1. Robert Brewer reporter

    Wow. Just commenting it out bumps a perf test I'm doing from 110 req/sec to 135 (since there's much less context switching back to the main thread, parse_request etc. complete much faster).

  2. Log in to comment