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 details)

Uploaded Source

Built Distribution

stop_thread-0.1.0-py3-none-any.whl (4.2 kB view details)

Uploaded Python 3

File details

Details for the file stop-thread-0.1.0.tar.gz.

File metadata

  • Download URL: stop-thread-0.1.0.tar.gz
  • Upload date:
  • Size: 4.1 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: poetry/1.1.13 CPython/3.8.5 Windows/10

File hashes

Hashes for stop-thread-0.1.0.tar.gz
Algorithm Hash digest
SHA256 3d1ddaddeb4cc9b09d4562e2a5516e027ce3df960d21bc0444bbd0b327597b3c
MD5 7f751dbce11f79d853a8963a9083d9f8
BLAKE2b-256 5da58dd1d40b4e0217218b12e1dfe73ec9107bd2694503d362696cbe8eec6658

See more details on using hashes here.

File details

Details for the file stop_thread-0.1.0-py3-none-any.whl.

File metadata

  • Download URL: stop_thread-0.1.0-py3-none-any.whl
  • Upload date:
  • Size: 4.2 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: poetry/1.1.13 CPython/3.8.5 Windows/10

File hashes

Hashes for stop_thread-0.1.0-py3-none-any.whl
Algorithm Hash digest
SHA256 eb3bd7ef096c3d3b8d8424035e655b47bbdfac334a65afaf19adc0aeb4ce8801
MD5 492101dded8733308dffe02e5dcecf31
BLAKE2b-256 172de23b33ce317ce3036002855669ad311acebda5dd9fbf43773937c8c81ffb

See more details on using hashes here.

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