Class UIBundlingThread

java.lang.Object
org.csstudio.ui.util.thread.UIBundlingThread
All Implemented Interfaces:
Runnable

public final class UIBundlingThread extends Object implements Runnable
A singleton back thread which will help to execute tasks in UI thread. This way we avoid slow downs, that occur on several operating systems, when Display.asyncExec() is called very often from background threads. This thread sleeps for a time, which is below the processing capacity of human eyes and brain - so the user will not feel any delay.
  • Method Details

    • getInstance

      public static UIBundlingThread getInstance()
      Gets the singleton instance.
      Returns:
      the singleton instance
    • run

      public void run()
      Specified by:
      run in interface Runnable
    • addRunnable

      public void addRunnable(Runnable runnable)
      Adds the specified runnable to the queue. Should not be used for RAP.
      Parameters:
      runnable - the runnable
    • addRunnable

      public void addRunnable(Display display, Runnable runnable)
      Adds the specified runnable to the queue. Fake method for adapting RAP.
      Parameters:
      runnable - the runnable