LWJGL / lwjgl3-demos

Demo suite for LWJGL 3
BSD 3-Clause "New" or "Revised" License
351 stars 89 forks source link

SWT async recursion is bad for Eclipse RCP environment #13

Closed dveyarangi closed 7 years ago

dveyarangi commented 7 years ago

Regarding the example at https://github.com/LWJGL/lwjgl3-demos/blob/master/src/org/lwjgl/demo/opengl/swt/SwtDemo.java

The proposed recursive call for display.asyncExec(new Runnable() { renderThings(); display.asyncExec( this ) } means that the async job queue is never empty. When running in Eclipse RCP environment, repositioning parts of RCP application waits until the queue is finished, but since this never happens, an attempt to move parts causes the entire application to stuck forever.

httpdigest commented 7 years ago

Thanks for the info with RCP! Would the following be okay in RCP? (does work in non-RCP)

display.asyncExec(new Runnable() {
  display.timerExec(0, new Runnable() {
    renderThings();
    display.timerExec(0, this);
  });
});