Eclipse - allowDeadlock 运行时选项

Eclipse - allowDeadlock runtime option

allowDeadlock 是 Eclipse runtime-options 之一,但没有描述

-allowDeadlock < description>

在这种情况下,

Eclipse Code 没有执行 UISynchronizer

if (avoidDeadlock) {
        UILockListener uiLockListener = new UILockListener(display);
        Job.getJobManager().setLockListener(uiLockListener);
        synchronizer = new UISynchronizer(display, uiLockListener);
        display.setSynchronizer(synchronizer);
        // declare the main thread to be a startup thread.
        UISynchronizer.startupThread.set(Boolean.TRUE);
    } else
        synchronizer = null;

但是我没有找到任何referencehow/when来使用它

I haven't removed the command line argument "-allowDeadlock" - who knows, someone might rely on it. (?)

是否有使用此标志的用例?在应用程序中查找可能卡住 eclipse 的死锁是否有用?

参见Javadoc of UILockListener

The UI lock listener is used to prevent the UI thread from deadlocking on a lock when the thread owning the lock is attempting to syncExec.

如果我理解正确,当 UI 线程中的插件持有锁并调用 syncExec(这它不应该)。所以这是 use/run 第三方插件的解决方法。

Eclipse bug 496422 中跟踪缺少的描述。