Skip to main content

Stop a thread in a nasty way

Project description

stop-thread

pytestpythonCode style: blackLicense: MITPyPI version

Stop a thread in a nasty way

Install it

pip install stop-thread
# pip install git+https://github.com/ffreemt/stop-thread
# poetry add git+https://github.com/ffreemt/stop-thread
# git clone https://github.com/ffreemt/stop-thread && cd stop-thread

Use it

import threading
from stop_thread import stop_thread

ident = threading.current_thread().ident
stop_thread(ident)
# possibly follow up with some clean-up to properly terminate the thread
# e.g. thread.quit(); thread.wait()

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

stop-thread-0.1.0.tar.gz (4.1 kB view hashes)

Uploaded Source

Built Distribution

stop_thread-0.1.0-py3-none-any.whl (4.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