fabioz/Pydev — pull request #129 by myaut (2014-08-31 10:03:33+00:00)
Title: Minimap may cause deadlock with main thread on Linux

On Linux SWT use global lock (org.eclipse.swt.internal.Platform.lock) for all platform-dependent functions. That may cause a deadlock between main thread and Worker that handles MinimapOverviewRuler$RedrawJob:

- main thread enters gtk_main_do_event and locks SWT lock
- worker thread enters run -> disposeStackedParameters, locking lockStackedParameters
- worker thread calls Parameters.dispose that have SWT dispose() calls. gc.dispose() waits for SWT lock
- main thread calls MinimapOverviewRuler$RedrawJob.setParameters waiting for lockStackedParameters

deadlock!

This commit moves gc.dispose() calls outside of lockStackedParameters using intermediate ArrayList as a container, which solves that problem.