Python3-笔记-E-014-库-threading线程

import threading, time

print('Start of program.')


def takeANap():
time.sleep(5)
print('Wake up!')


threadObj = threading.Thread(target=takeANap)
threadObj.start()
print('End of program.')
posted @ 2017-11-14 13:18  魏桐  阅读(108)  评论(0编辑  收藏  举报