xHarbour Reference Documentation > Command Reference |
Enables or disables the activity of background tasks.
SET BACKGROUND TASKS on | OFF | (<lOnOff>)
SET BACKGROUND TASKS toggles the activity of background task processing. Backgound tasks are defined with function HB_BackGroundAdd() and run concurrently to regular program routines. Use function HB_IdleAdd() to process concurrent tasks during idle states only.
To enable background task processing, SET BACKGROUND TASKS must be set to ON.
See also: | HB_BackGroundAdd(), Set(), SET BACKGROUNDTICK |
Category: | Background processing , SET commands , xHarbour extensions |
Source: | rtl\set.c |
LIB: | xhb.lib |
DLL: | xhbdll.dll |
// The example demonstrates how the time can be displayed // continuously while MemoEdit() is active. PROCEDURE Main LOCAL nTask HB_IdleAdd( {|| HB_BackGroundRun() } ) nTask := HB_BackGroundAdd( {|| ShowTime( MaxRow(), MaxCol()-7 ) }, 1000 ) SET BACKGROUND TASKS ON MemoEdit( MemoRead( "Test.prg" ), 1, 0, MaxRow()-2, MaxCol() ) HB_BackGroundDel( nTask ) RETURN PROCEDURE ShowTime( nRow, nCol ) DispoutAt( nRow, nCol, Time() ) RETURN
http://www.xHarbour.com