Message8311

Author indra
Recipients indra, rchyla
Date 2014-04-26.11:23:00
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <1398511382.17.0.88493936124.issue2127@psf.upfronthosting.co.za>
In-reply-to
Content
From what I can reason from the code and the test case the issue is that the RefReaperThread is leaked rather than objects in the ReferenceQueue not being GC'd.  

The attached patch *should* allow the reference reaper thread created by GlobalRef to die *and* respawn if necessary. It does this be changing the RefReaper to a Runnable (attempting to avoid the issue detailed in https://bitbucket.org/jython/jython/pull-request/19/pysystemstateclosershutdowncloser-use/diff) and implementing Callable so that it can be registered with the PySystemState as a resource closer and thus be cleaned up when PySystemState.cleanup() is called.

I think I managed to run rchyla's test case successfully once I added a call to the interpeter's cleanup method, i.e.:
            interp.exec("import weakref");
            interp.cleanup();


I'm not sure of the best way to incorporate a test for this into the build so any pointers as to how/where to add a test would be great.
History
Date User Action Args
2014-04-26 11:23:02indrasetmessageid: <1398511382.17.0.88493936124.issue2127@psf.upfronthosting.co.za>
2014-04-26 11:23:02indrasetrecipients: + indra, rchyla
2014-04-26 11:23:02indralinkissue2127 messages
2014-04-26 11:23:01indracreate