AYUDA EN LÍNEA
 WINDEVWEBDEV Y WINDEV MOBILE

Ayuda / WLanguage / Funciones WLanguage / Funciones estándar / Funciones de gestión de procesos / Tareas paralelas
  • 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)
Versión mínima requerida
  • Versión 20
Esta página también está disponible para…
Comentarios
Haga clic en [Agregar] para publicar un comentario

Última modificación: 27/05/2022

Señalar un error o enviar una sugerencia | Ayuda local