terminate_thread
Project description
import threading
import time
from terminate_thread import terminate
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)
exit(0)
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
terminate_thread-0.0.1.tar.gz
(8.7 kB
view hashes)
Built Distribution
Close
Hashes for terminate_thread-0.0.1-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | bc934aac999e036dc46dca4579ab9e7cc6b04e01bbbdf7af2ed6345bc05bfb67 |
|
MD5 | 30f936e0dbab77c9417c4b6cbe76e0e5 |
|
BLAKE2b-256 | 748efa7bcea2b56b5c121dfdb1e7eeb9f99338c0417e249a4c97be21fc1639ab |