ONLINE HELP
 WINDEVWEBDEV AND WINDEV MOBILE

Help / WLanguage / WLanguage functions / Standard functions / Process functions / Parallel tasks
  • Running parallel tasks with a continuation task
ParallelTaskExecute (Example)
Running parallel tasks with a continuation task
This example runs a process after the execution of all the tasks.
// Declare several tasks and run a process at the end of all these tasks.
 
MyTaskDescription is Description of ParallelTask
arrMyTasks is array of ParallelTask // Result of parallel tasks functions
 
// Task #1
MyTaskDescription.Procedure = Example2_Step1
 
// Runs the parallel tasks
// Adds the task returned to an array of tasks
// in order to re-use them in ParallelTaskExecuteAfterAll
Add(arrMyTasks, ParallelTaskExecute(MyTaskDescription))
 
// Task #2
MyTaskDescription.Procedure = Example2_Step2
Add(arrMyTasks, ParallelTaskExecute(MyTaskDescription))
 
// Specifies the procedure to run once
// once all the tasks found in the arrMyTasks array are ended
ParallelTaskExecuteAfterAll(arrMyTasks, Example2_End, (), ptoMainThread)
Minimum version required
  • Version 20
This page is also available for…
Comments
Click [Add] to post a comment

Last update: 05/26/2022

Send a report | Local help