pypprof
pypprof copied to clipboard
Compatible with gevent
When using start_pprof_server
with gevent monkey patched threading module, server will block when someone called the pprof endpoint.
This is because thread is patched to be greenlet, which is nonpreemptive, unless some IO syscall happened. pprof is CPU bounded so this will block the main server process.
This patch will try to using original thread implmentation when gevent is avialble.