pypprof icon indicating copy to clipboard operation
pypprof copied to clipboard

Compatible with gevent

Open aisk opened this issue 2 years ago • 0 comments

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.

aisk avatar Dec 10 '21 11:12 aisk