import thread; thread.start_new_thread( my_function, (args in a tuple structure).
Then inside my_function,time.sleep(x) to call the grist of the function at regular intervals from within a loop (e..g while true; or while count < x:).
Threads are sometimes called light-weight processes. They do not require as much memory overhead as a regular process.
Then inside my_function,time.sleep(x) to call the grist of the function at regular intervals from within a loop (e..g while true; or while count < x:).
Threads are sometimes called light-weight processes. They do not require as much memory overhead as a regular process.
No comments:
Post a Comment