From ac55d9ff0b588b91202ccad72ee71e508e33ad08 Mon Sep 17 00:00:00 2001 From: bd Date: Sat, 19 Jul 2025 22:21:10 -0600 Subject: Reformat repository to allow for new unit tests --- t/threads.py | 23 +++++++++++++++++++++++ 1 file changed, 23 insertions(+) create mode 100644 t/threads.py (limited to 't/threads.py') diff --git a/t/threads.py b/t/threads.py new file mode 100644 index 0000000..fa9c7ac --- /dev/null +++ b/t/threads.py @@ -0,0 +1,23 @@ +import asyncio +import threading + + + +async def count(): + print("it's a secret!") + await asyncio.sleep(3) + + +async def main(): + await asyncio.gather(count(), count(), count()) + print("done") + + +def thread_func(): + asyncio.run(main()) + + +if __name__ == "__main__": + x = threading.Thread(target=thread_func) + x.start() + x.join() -- cgit v1.2.3