Re: MultiTasking: Needs "id_running?" function

new topic     » goto parent     » topic index » view thread      » older message » newer message

Al Getz wrote:
> I find that there is no function in the MT preview release to call to
> find out if a particular task is running or not.  This is rather important
> to have in some apps that will allow user input to determine which
> threads will be run.  Some tasks will not be allowed to start if yet
> some other tasks are running.
> 
> For example, the user clicks "Save" which starts the file save task for
> that app, then clicks "Exit" while the file save is still in progress.
> Obviously you want to stop the program from aborting and display a 
> message telling the user to wait for the file save to complete.
> 
>   if task_running(Task_ID1) then
>     MessageBoxOk("Your data is being saved...please wait...")
>   end if
> 
> There's also the possibility (optional) of detecting if *any* tasks are still
> running (other than task=0) with something like this:
> 
>   if task_any_running() then
>     --(code here)
>   end if

I'll accept your vote for those. There's a very good chance I'll do them.
I figured that if you are waiting for a task to finish, it's probably
because you are waiting for some variable to be set, and you could
check the variable.

The initial API is the minimum that I thought was needed.
It would be easy to add other calls, but I wanted to see what
people would ask for before I started adding stuff that might be 
rarely used or unnecessary.

Thanks,
   Rob Craig
   Rapid Deployment Software
   http://www.RapidEuphoria.com

new topic     » goto parent     » topic index » view thread      » older message » newer message

Search



Quick Links

User menu

Not signed in.

Misc Menu