Skeleton bg app process

This commit is contained in:
Oskar Thoren 2019-02-20 23:37:34 -05:00
parent edce7e6976
commit 0bb19da637
1 changed files with 18 additions and 0 deletions

18
data_sync/app.py Normal file
View File

@ -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()