• Create BookmarkCreate Bookmark
  • Create Note or TagCreate Note or Tag
  • PrintPrint
Share this Page URL
Help

Chapter 5. Display > Runnable “Execs”

5.5. Runnable “Execs”

In the same manner as listeners, runnable execs (referred to from now on simply as runnables) are application-defined blocks of code that are executed by the Display. However, there are several notable differences between listeners and runnables. Runnables are executed once, whereas listeners are typically invoked repeatedly, each time the event occurs. Runnables take no parameters and generally once they are added, they cannot be removed.

Runnables are used for timers (see the section Timers), executing code in the user interface thread (see the section Apartment Threading) and running code when a display is disposed.


PREVIEW

                                                                          

Not a subscriber?

Start A Free Trial


  
  • Creative Edge
  • Create BookmarkCreate Bookmark
  • Create Note or TagCreate Note or Tag
  • PrintPrint