Skip to content

Compatible with gevent - #5

Open
aisk wants to merge 1 commit into
timpalpant:masterfrom
aisk:patch-3
Open

Compatible with gevent#5
aisk wants to merge 1 commit into
timpalpant:masterfrom
aisk:patch-3

Conversation

@aisk

@aisk aisk commented Dec 10, 2021

Copy link
Copy Markdown

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant