Valutazione attuale: 0 / 5

Stella inattivaStella inattivaStella inattivaStella inattivaStella inattiva
 

The idle state is the state of the harbour virtual machine when it waits for the user input from the keyboard or the mouse. The idle state is entered during Inkey() calls currently. All applications that don't use Inkey() function call can signal the idle states with the call of hb_idleState() function (or hb_idleState() on C level).

During idle states the virtual machine calls the garbage collector and it can call user defined actions (background tasks). It also releases the CPU time slices for some poor platforms that are not smart enough to detect it automatically.
 
For defining the background tasks see the hb_idleAdd() and hb_idleDel() functions.
 
For direct call for background actions see hb_idleState() function.
 
For signaling the idle state from C code see the hb_idleState() API function.