Backgroundtask in harbour like in xharbour

Post Reply
Marc Vanzegbroeck
Posts: 1195
Joined: Mon Oct 17, 2005 5:41 am
Location: Belgium
Contact:

Backgroundtask in harbour like in xharbour

Post by Marc Vanzegbroeck »

Hi,

In xHarbour I use a backgroundtask to start a external program that creates a text-file, and this file I import in my program.

I'm converting this to UT with Harbour, but I notice that that doesn't exist.
Is there something simular in Harbour

Code: Select all | Expand

      hb_IdleAdd( {|| hb_BackGroundRun() } )
      obck = hb_BackGroundAdd( {|| myfunction() }, 5000, .T. )
      SET BACKGROUND TASKS ON
Regards,
Marc

FWH32+xHarbour | FWH64+Harbour | BCC | DBF | ADO+MySQL | ADO+MariaDB | ADO+SQLite
User avatar
Lailton
Posts: 231
Joined: Fri Jul 20, 2012 1:49 am
Location: Brazil
Contact:

Re: Backgroundtask in harbour like in xharbour

Post by Lailton »

Not sure if is the same but

Code: Select all | Expand

hb_threadStart( {|| myfunction() } )
in case you need pass argument

Code: Select all | Expand

hb_threadStart( @myFunction(), 5000, .t. ) 

or 

hb_threadStart( { | n, l | myFunction( n, l ) }, 5000, .t. )
Regards,
Lailton Fernando Mariano
Marc Vanzegbroeck
Posts: 1195
Joined: Mon Oct 17, 2005 5:41 am
Location: Belgium
Contact:

Re: Backgroundtask in harbour like in xharbour

Post by Marc Vanzegbroeck »

Thank you,

I will try it.

I couldn't find anything about this in the documentation op Harbour..
Regards,
Marc

FWH32+xHarbour | FWH64+Harbour | BCC | DBF | ADO+MySQL | ADO+MariaDB | ADO+SQLite
Post Reply