|
|
|
|
|
ParallelTaskExecuteAfterAll (Function) In french: TâcheParallèleExécuteAprèsToutes Indicates a continuation parallel task that will be run when all the tasks found in an array of parallel tasks are ended.
// Lance deux tâches t1 is ParallelTask = ParallelTaskExecute(Proc1) t2 is ParallelTask = ParallelTaskExecute(Proc2) // Lorsque les deux tâches seront terminées, la procédure ProcContinuation sera exécutée ParallelTaskExecuteAfterAll([t1,t2], ProcContinuation) Syntax
Indicating a procedure that will be run after all the previous tasks Hide the details
<Result> = ParallelTaskExecuteAfterAll(<Previous tasks> , <Continuation procedure> [, <Parameters> [, <Options>]])
<Result>: ParallelTask variable ParallelTask variable corresponding to the continuation task. <Previous tasks>: Array of ParallelTasks Name of the Array of ParallelTask variable containing the previous tasks. <Continuation procedure>: Character string or Procedure variable Procedure to run after the execution of all previous tasks. This parameter corresponds to: - the name of the WLanguage procedure to run.
- the name of Procedure variable corresponding to the procedure to run.
<Parameters>: List of values enclosed in brackets and separated by commas Parameters of procedure to run. This list of parameters has the following format: (<Paramètre 1>, ..., <Paramètre N>) where: - <Parameter 1>: First procedure parameter.
- ...
- <Parameter N>: Nth procedure parameter.
The PreviousTasksReturnValues keyword is used to pass the return values of previous tasks as a parameter to the continuation Procedure. The order of these values corresponds to the order specified by (array of previous tasks).. <Options>: Optional Integer constant (or combination of constants) Options of task to run: | | ptoDelayedCopyHFSQLContext (Default value) | Triggers a light copy of HFSQL context during the first access to the HFSQL data. | ptoFullCopyHFSQLContext | Triggers the immediate copy of the current HFSQL context. Recommended, for example, if the parallel task must take into account the current positions in the files and queries of the context of the caller. | ptoLightCopyHFSQLContext | Triggers the immediate copy of a part of the current HFSQL context. Only the directories containing the data files in HFSQL Classic mode and/or the connections in HFSQL Client/Server mode are stored. | ptoMainThread | Runs the task in the main thread. This constant can be combined with one of the other constants. |
Indicating a described task that will be run after all the previous tasks Hide the details
<Result> = ParallelTaskExecuteAfterAll(<Previous tasks> , <Continuation task>)
<Result>: ParallelTask variable ParallelTask variable corresponding to the continuation task. <Previous tasks>: Array of ParallelTasks Name of the Array of ParallelTask variable containing the previous tasks. <Continuation task>: ParallelTask variable Name of the ParallelTask variable corresponding to the continuation task.
Describing a task that will be run after all the previous tasks Hide the details
<Result> = ParallelTaskExecuteAfterAll(<Previous tasks> , <Description of continuation task>)
<Result>: ParallelTask variable ParallelTask variable corresponding to the continuation task. <Previous tasks>: Array of ParallelTasks Name of the Array of ParallelTask variable containing the previous tasks. <Description of continuation task>: Description of ParallelTask variable Name of the Description of ParallelTask variable describing the continuation task. Remarks - ParallelTaskExecuteAfterAll is a non-blocking function.
- If the function is called while all the tasks are already ended, the continuation will be run as soon as possible.
- If the function is called while a task is already canceled, the continuation will not be run.
- If a previous task is canceled while a continuation was created, the continuation will not be run.
- In the code of the continuation task, the MyPreviousParallelTasks keyword is used to handle the previous tasks.
Related Examples:
|
Unit examples (WINDEV): Using parallel tasks
[ + ] The parallel tasks are used to speed up the process times and to improve the reactivity of an application. This example presents the functions and types of variables required to use the parallel tasks: - running parallel tasks, - interaction with the controls, - continuation tasks.
|
This page is also available for…
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|