@Override
    public void destroy(boolean waitFor) {
        needClose.set(true);

        if (mainThread == Thread.currentThread()) {
            // Ignore waitFor.
            return;
        }

        if (waitFor) {
            waitFor(false);
        }
    }
De-initialize in the OpenGL thread.
jme3-lwjgl3/src/main/java/com/jme3/system/lwjgl/LwjglWindow.java