Skip to main content

Deadlocks? Detect where your threads hang in Python with one import.

Project description

Copy this code and do

import hanging_threads

If a thread is at the same place for SECONDS_FROZEN then the stacktrace is printed.

This script prints

——————– Thread 6628 ——————–
File “hanging_threads.py”, line 70, in <module>

time.sleep(3) # TEST

——————– Thread 6628 ——————–
File “hanging_threads.py”, line 70, in <module>

time.sleep(3) # TEST

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

hanging_threads-0.0.1.zip (4.7 kB view hashes)

Uploaded Source

Built Distribution

hanging_threads-0.0.1-py3-none-any.whl (6.2 kB view hashes)

Uploaded Python 3

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page