srlindsay/gevent-profiler — pull request #5 by daf (2012-04-17 12:56:51+00:00)
Title: Allow setting the attach timeout

I ran into some problems while trying to profile long-running operations - whenever my code eventually got to the `detach` method, it would just throw a python error. Tracing the steps, I figured it out there is a timeout involved, by default set to 60 seconds.

This patch does a few things:

- Makes it so calling `detach` when there isn't an active `attach` session is not an error
- Allows you to configure or disable the timeout by calling `set_attach_duration` - set to `0` to disable.