mirror of https://github.com/vacp2p/research.git
Skeleton bg app process
This commit is contained in:
parent
edce7e6976
commit
0bb19da637
|
@ -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()
|
Loading…
Reference in New Issue