MultiTasking: Needs "id_running?" function
- Posted by Al Getz <Xaxo at aol.com> Sep 23, 2005
- 454 views
Hello, 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 Yes, i could manage keeping track of running (or not) tasks myself, but then i'd have to re-wrap some of the task function calls :) Take care, Al And, good luck with your Euphoria programming! My bumper sticker: "I brake for LED's"