nose
nose copied to clipboard
nosetests hangs with Queue + threading
A test code using Queue, threading with numpy hangs nosetests. The code looks like:
import numpy
from Queue import Queue
from threading import Thread
a = numpy.eye(100)
q = Queue()
def g(x):
return a.dot(a) * x
def f(x):
q.put(g(x))
t = Thread(target=f, args=(1,))
t.start()
t.join()
b = q.get()