BACKGROUNDHANDLERCOMMAND

Detailed Description

Enumerations

enum  BACKGROUNDHANDLERCOMMAND {
  BACKGROUNDHANDLERCOMMAND_ISRUNNING,
  BACKGROUNDHANDLERCOMMAND_STOP,
  BACKGROUNDHANDLERCOMMAND_START,
  BACKGROUNDHANDLERCOMMAND_REMOVE
}
 

Enumeration Type Documentation

§ BACKGROUNDHANDLERCOMMAND

Enumerator
BACKGROUNDHANDLERCOMMAND_ISRUNNING 

Return true if the handler is currently running, otherwise false.

BACKGROUNDHANDLERCOMMAND_STOP 

Stop the current activity. Return true when the activity has stopped.

BACKGROUNDHANDLERCOMMAND_START 

Check if there is something to do. If not, return false. In case there is something to do, directly start this job and return true.
There is also the possibility to do a small job synchronously and return false (pretend as if nothing was started).

Note
As the background handler is processed in the main application thread this means that if you process something unthreaded, the complete application will be blocked.
For example some code that takes 10 seconds means that the user will not be able to click on any button or stop anything during that time.
That is why only extremely short tasks must be directly processed, otherwise start an asynchronous thread.
BACKGROUNDHANDLERCOMMAND_REMOVE 

The handler is being removed. Return true.