Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- # loose_thread.py <<< missing ~ ''.join.allthreads >>> Note: It will even insert the results within results or append
- ###ZZZ Could this also be able to multi-buffer images? Can't find the solution anywhere
- from sys import stdout
- from time import sleep
- from random import randint
- from thread import start_new_thread
- import e32
- def worker(name):
- wait=randint(2,7)
- sleep(wait)
- print "I'm",name,"and waited",wait,"seconds."
- stdout.flush()
- start_new_thread(worker,("thread 1",))
- start_new_thread(worker,("thread 2",))
- start_new_thread(worker,("thread 3",))
- start_new_thread(worker,("thread 4",))
- start_new_thread(worker,("thread 5",))
- start_new_thread(worker,("thread 6",))
- start_new_thread(worker,("thread 7",))
- start_new_thread(worker,("thread 8",))
- start_new_thread(worker,("thread 9",))
- while True:
- pass # To be False based on what reason though? I might never know
- e32.ao_yield()
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement