Ticket #1604 (closed defect: fixed)
Opened 2012-12-12T13:20:10-06:00
Last modified 2012-12-14T14:23:12-06:00
Legacy output tracking can be problematic
Reported by: | bdezonia | Owned by: | bdezonia |
---|---|---|---|
Priority: | major | Milestone: |
|
Component: | Legacy Compatibility | Version: | |
Severity: | serious | Keywords: | |
Cc: | curtis | Blocked By: | |
Blocking: | #1584 |
Description
Note that the legacy output tracking stores info in thread local lists. Any legacy plugin that creates threads that display image data can hatch legacy outputs that are not seen by LegacyCommand (because the output set and closed set are in different thread locals). Figure out a way to fix this.
I had thought of making the output tracker keep a single pair of lists of imagePluses that are hashed on thread group. Then no thread local duplication arises. Perhaps there are issues with this though. Such as two plugins with different sets of outputs getting lumped together in one output imps set. Probably this is not an issue. Investigate the best approach.
Change History
comment:2 Changed 2012-12-12T16:11:30-06:00 by bdezonia
- Cc curtis added
I committed an experimental fix on the legacy-tracker branch. The approach is indeed to track imagePluses per ThreadGroup rather than per Thread. LegacyCommand was already making its own ThreadGroup for other reasons. This new implementation eliminates ThreadLocals in lieu of synchronized methods. The methods are static but this is not really a change from before.
Curtis please review and let me know what you think of the design. Thanks.
comment:3 Changed 2012-12-12T16:16:51-06:00 by bdezonia
Note: this ticket was hatched as a result of investigating #1404. That ticket has a source snippet that could be used to test this new implementation. That remains as a TODO.
comment:4 Changed 2012-12-14T14:22:07-06:00 by bdezonia
- Status changed from new to closed
- Resolution set to fixed
- Milestone changed from imagej2-b7-ndim-data to imagej2-b6-legacy-undo
Fixed with merge commit 3e5ee3f7bb7ff765c4ef1d1dca587d6090a63c9b