@Override
    protected void runLoop() {
        if (needResize.get()) {
            needResize.set(false);
            settings.setResolution(framebufferWidth, framebufferHeight);
            listener.reshape(framebufferWidth, framebufferHeight);
        }
        
        // check component status
        if (!checkVisibilityState()) {
            return;
        }

        //----------------------------------------------------------------------
        //                          AWT - RENDERER
        //----------------------------------------------------------------------
        /*
         * The same logic as AWTGLCanvas is used to draw on the awt drawing surface:
         * 
         * 1. Lock any thread to avoid any conflict.
         * 2. Buffer swap (this is where the framebuffer is actually drawn): swapBuffers()
         * 3. Unlock so that the AWT thread can work normally. IF NOT DONE, IT WILL 
         *    BE WAITING AND BREAK ANY AWT/Swing APP.
         */
        canvas.beforeRender();
        try {
            super.runLoop();
            if (allowSwapBuffers && autoFlush) {
                canvas.swapBuffers();
            }
        } finally {
            canvas.afterRender();
        }
        
        // Sync the display on some systems.
        Toolkit.getDefaultToolkit().sync();
        
        //----------------------------------------------------------------------
        /*
         * Whether it is necessary to know the effective attributes to 
         * initialize the LWJGL3-AWT context
         */
        //----------------------------------------------------------------------
        if (showGLDataEffective.get()) {
            showGLDataEffective.set(false);
            System.out.println(MessageFormat.format("[ DEBUGGER ] :Effective data to initialize the LWJGL3-AWT context\n{0}", 
                                                getPrintContextInitInfo(canvas.getGLDataEffective())));
        }

        try {
            if (signalTerminate.tryAcquire(10, TimeUnit.MILLISECONDS)) {
                canvas.doDisposeCanvas();
            }
        } catch (InterruptedException ignored) { }
    }
(non-Javadoc)
@see com.jme3.system.lwjgl.LwjglWindow#runLoop()
jme3-lwjgl3/src/main/java/com/jme3/system/lwjgl/LwjglCanvas.java