##// END OF EJS Templates
First beam is loaded by default after sending the beam file to the control modules.
First beam is loaded by default after sending the beam file to the control modules.

File last commit:

r122:123
r231:232
Show More
test1.py
21 lines | 524 B | text/x-python | PythonLexer
import Queue
import threading
def basic_worker(queue):
while True:
item = queue.get()
# do_work(item)
print(item)
queue.task_done()
def basic():
# http://docs.python.org/library/queue.html
queue = Queue.Queue()
for i in range(3):
t = threading.Thread(target=basic_worker,args=(queue,))
t.daemon = True
t.start()
for item in range(4):
queue.put(item)
queue.join() # block until all tasks are done
print('got here')
basic()