Skip to content

Instantly share code, notes, and snippets.

Created Aug 20, 2014
What would you like to do?
>>> def timer(t, cb):
... time.sleep(t)
... cb()
>>> import time
>>> def foo():
... print("Я проснулася!")
>>> th = threading.Thread(name='th1', target=timer, args=(5, foo))
>>> th.start()
>>> Я проснулася!
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment