Skip to content

Instantly share code, notes, and snippets.

@ehfeng
Created June 26, 2017 22:40
Show Gist options
  • Save ehfeng/bb6fc7491d453352935cf58b594aaa91 to your computer and use it in GitHub Desktop.
Save ehfeng/bb6fc7491d453352935cf58b594aaa91 to your computer and use it in GitHub Desktop.
from threading import Thread
import time
def stuff():
print('in thread')
time.sleep(0.5)
print('ending thread')
t = Thread(target=stuff)
t.setDaemon(True)
t.start()
print('outside thread')
time.sleep(1)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment