Download python/concurrency.py from neopilot/PyRs2: direct link, hf CLI and curl.
- Browser
- Download file 242 Bytes
-
https://huggingface.co/datasets/neopilot/PyRs2/resolve/main/python/concurrency.py
- Command line
-
hf download hf://datasets/neopilot/PyRs2/python/concurrency.py
-
curl -L -o concurrency.py https://huggingface.co/datasets/neopilot/PyRs2/resolve/main/python/concurrency.py
242 Bytes
| import threading | |
| import time | |
| def worker(): | |
| print("Worker thread starting...") | |
| time.sleep(1) | |
| print("Worker thread finishing.") | |
| thread = threading.Thread(target=worker) | |
| thread.start() | |
| thread.join() | |
| print("Main thread finishing.") |