```python3
import threading
import time
from terminate_thread import terminate, kill
def thread_func1():
n = 0
while True:
n += 1
print(n, t)
time.sleep(1)
if __name__ == "__main__":
t = threading.Thread(target=thread_func1, )
t.start()
time.sleep(2)
terminate(t)
# or
kill(t)
exit(0)
```
Raw data
{
"_id": null,
"home_page": null,
"name": "terminate-thread",
"maintainer": null,
"docs_url": null,
"requires_python": ">=3.6",
"maintainer_email": null,
"keywords": "terminate thread, kill thread, stop thread",
"author": null,
"author_email": "calm51 <calm51@protonmail.com>",
"download_url": "https://files.pythonhosted.org/packages/f8/10/abb8568b0240baccd5bc32dde362d9b1d81026c0c6c519d72449b0f1fd3d/terminate_thread-0.0.3.tar.gz",
"platform": null,
"description": "```python3\r\nimport threading\r\nimport time\r\nfrom terminate_thread import terminate, kill\r\n\r\n\r\ndef thread_func1():\r\n n = 0\r\n while True:\r\n n += 1\r\n print(n, t)\r\n time.sleep(1)\r\n\r\n\r\nif __name__ == \"__main__\":\r\n t = threading.Thread(target=thread_func1, )\r\n t.start()\r\n time.sleep(2)\r\n\r\n terminate(t)\r\n # or\r\n kill(t)\r\n\r\n exit(0)\r\n\r\n\r\n```\r\n",
"bugtrack_url": null,
"license": null,
"summary": "terminate_thread",
"version": "0.0.3",
"project_urls": {
"Homepage": "https://github.com/calm51/terminate_thread",
"Issues": "https://github.com/calm51/terminate_thread/issues"
},
"split_keywords": [
"terminate thread",
" kill thread",
" stop thread"
],
"urls": [
{
"comment_text": "",
"digests": {
"blake2b_256": "3ff9980e4be6158ca49bc3f3304afcdc4b15c2970975593b9b28a36d49edc769",
"md5": "0fda75b72550321cbf62e1c4353e5c15",
"sha256": "d9d4604d68ba2a7dba0a323f494015355a284014aaac72d13049fb7321a31b60"
},
"downloads": -1,
"filename": "terminate_thread-0.0.3-py3-none-any.whl",
"has_sig": false,
"md5_digest": "0fda75b72550321cbf62e1c4353e5c15",
"packagetype": "bdist_wheel",
"python_version": "py3",
"requires_python": ">=3.6",
"size": 8998,
"upload_time": "2024-04-15T07:29:21",
"upload_time_iso_8601": "2024-04-15T07:29:21.950262Z",
"url": "https://files.pythonhosted.org/packages/3f/f9/980e4be6158ca49bc3f3304afcdc4b15c2970975593b9b28a36d49edc769/terminate_thread-0.0.3-py3-none-any.whl",
"yanked": false,
"yanked_reason": null
},
{
"comment_text": "",
"digests": {
"blake2b_256": "f810abb8568b0240baccd5bc32dde362d9b1d81026c0c6c519d72449b0f1fd3d",
"md5": "944bfecd7770c8a5b991f38c8b6c6887",
"sha256": "be49c5c036b238275a06d9f5e918f93c2664803bb87d473316b33dbd67a87e84"
},
"downloads": -1,
"filename": "terminate_thread-0.0.3.tar.gz",
"has_sig": false,
"md5_digest": "944bfecd7770c8a5b991f38c8b6c6887",
"packagetype": "sdist",
"python_version": "source",
"requires_python": ">=3.6",
"size": 8968,
"upload_time": "2024-04-15T07:29:23",
"upload_time_iso_8601": "2024-04-15T07:29:23.751467Z",
"url": "https://files.pythonhosted.org/packages/f8/10/abb8568b0240baccd5bc32dde362d9b1d81026c0c6c519d72449b0f1fd3d/terminate_thread-0.0.3.tar.gz",
"yanked": false,
"yanked_reason": null
}
],
"upload_time": "2024-04-15 07:29:23",
"github": true,
"gitlab": false,
"bitbucket": false,
"codeberg": false,
"github_user": "calm51",
"github_project": "terminate_thread",
"github_not_found": true,
"lcname": "terminate-thread"
}