I'm using parallel-python and start a new job server in a function. after the functions ends it still exists even though I didn't return it out of the function (I used weakref to test this). I guess there's still some references to this object somewhere. My two theories: It starts threads and it logs to root logger.
My questions: can I somehow findout in which namespace there is still a reference to this object. I have the weakref reference. Does anyone know how to detach a logger? What other debug suggestions do people have?
here is my testcode:
def pptester():
js=pp.Server(ppservers=nodes)
js.set_ncpus(0)
fh=file('tmp.tmp.tmp','w')
tmp=[]
for i in range(200):
tmp.append(js.submit(ppworktest,(),(),('os','subprocess')))
js.print_stats()
return weakref.ref(js)
thanks in advance Wolfgang