Package org.csstudio.ui.util.thread
Class UIBundlingThread
java.lang.Object
org.csstudio.ui.util.thread.UIBundlingThread
- All Implemented Interfaces:
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 Summary
Modifier and TypeMethodDescriptionvoid
addRunnable
(Runnable runnable) Adds the specified runnable to the queue.void
addRunnable
(Display display, Runnable runnable) Adds the specified runnable to the queue.static UIBundlingThread
Gets the singleton instance.void
run()
-
Method Details
-
getInstance
Gets the singleton instance.- Returns:
- the singleton instance
-
run
public void run() -
addRunnable
Adds the specified runnable to the queue. Should not be used for RAP.- Parameters:
runnable
- the runnable
-
addRunnable
Adds the specified runnable to the queue. Fake method for adapting RAP.- Parameters:
runnable
- the runnable
-