From 0bb19da6377e8a5eb66a7dd4ca0002c169cb9ae5 Mon Sep 17 00:00:00 2001 From: Oskar Thoren Date: Wed, 20 Feb 2019 23:37:34 -0500 Subject: [PATCH] Skeleton bg app process --- data_sync/app.py | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+) create mode 100644 data_sync/app.py diff --git a/data_sync/app.py b/data_sync/app.py new file mode 100644 index 0000000..5b51428 --- /dev/null +++ b/data_sync/app.py @@ -0,0 +1,18 @@ +import threading, time + +def process(): + while True: + print("Sleeping for one second") + time.sleep(1) + +def main(): + # Start background thread + thread = threading.Thread(target=process) + thread.daemon = True + thread.start() + + while True: + text = input("Please write a message\n") + print("You wrote", text) + +main()