Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- import c4d
- import time
- import threading
- def printer(interval=1):
- printer.running = True
- while printer.running:
- print "printer() loop"
- time.sleep(interval)
- def main():
- thread = threading.Thread(target=printer)
- thread.start()
- # time intensive stuff
- printer.running = False
- thread.join()
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement