summaryrefslogtreecommitdiff
path: root/misc/threadDemo.py
diff options
context:
space:
mode:
authormlot <petri-rush-curvy@duck.com>2025-06-06 13:40:57 -0400
committermlot <petri-rush-curvy@duck.com>2025-06-06 13:40:57 -0400
commit75a42ec54dbf721caa659ddf02c1f46fc2cb4bef (patch)
tree84be794a2481e356a7784557a6f9fb6fbf29cfdd /misc/threadDemo.py
initial commit for archivingHEADmain
Diffstat (limited to 'misc/threadDemo.py')
-rw-r--r--misc/threadDemo.py17
1 files changed, 17 insertions, 0 deletions
diff --git a/misc/threadDemo.py b/misc/threadDemo.py
new file mode 100644
index 0000000..1410b95
--- /dev/null
+++ b/misc/threadDemo.py
@@ -0,0 +1,17 @@
+#! python3
+
+# threadDemo.py
+
+import time
+import threading
+
+print('Start of program.')
+
+def takeANap():
+ time.sleep(5)
+ print('Wake up!')
+
+threadObj = threading.Thread(target=takeANap)
+threadObj.start()
+
+print('End of program.')