Python, Concurrency, Parallelism, Multiprocessing, Asynchronous.
background tasks do not keep the application running if the primary execution flow has concluded. def foo(): for i in range(10): print('inside foo') time.sleep(2) t = threading.Thread(target = foo) # change thread to daemon t.setDaemon(True) t.start() time.sleep(4) print('end of main') ######