Message8311
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. |
|
Date |
User |
Action |
Args |
2014-04-26 11:23:02 | indra | set | messageid: <1398511382.17.0.88493936124.issue2127@psf.upfronthosting.co.za> |
2014-04-26 11:23:02 | indra | set | recipients:
+ indra, rchyla |
2014-04-26 11:23:02 | indra | link | issue2127 messages |
2014-04-26 11:23:01 | indra | create | |
|