ONLINE HELP
 WINDEVWEBDEV AND WINDEV MOBILE

Help / WLanguage / WLanguage functions / Standard functions / Process functions / Parallel tasks
WINDEV
WindowsLinuxUniversal Windows 10 AppJavaReports and QueriesUser code (UMC)
WEBDEV
WindowsLinuxPHPWEBDEV - Browser code
WINDEV Mobile
AndroidAndroid Widget iPhone/iPadIOS WidgetApple WatchMac CatalystUniversal Windows 10 App
Others
Stored procedures
Indicates a continuation parallel task that will be run when the specified parallel task is completed.
Example
// Starts a task
t1 is ParallelTask = ParallelTaskExecute(Proc1)
// The ContinuationProc procedure will be run when the task is completed
ParallelTaskExecuteAfter(t1, ContinuationProc)
Syntax

Indicating a procedure that will be run after a previous task Hide the details

<Result> = ParallelTaskExecuteAfter(<Previous task> , <Continuation procedure> [, <Parameters> [, <Options>]])
<Result>: ParallelTask variable
ParallelTask variable corresponding to the continuation task.
<Previous task>: ParallelTask variable
Name of ParallelTask variable corresponding to the previous task.
<Continuation procedure>: Character string or Procedure variable
Procedure to run after the specified previous task. This parameter can correspond to:
  • the name of the WLanguage procedure to run.
  • the name of the Procedure variable corresponding to the continuation 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:
(<Parameter 1>, ..., <Parameter N>)
where:
  • <Parameter 1>: First procedure parameter.
  • ...
  • <Parameter N>: Nth procedure parameter.
Remark: The ReturnedValuePreviousTask keyword is used to pass the return values of the previous task as parameter of continuation procedure.
<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.
ptoFullCopyHFSQLContextTriggers 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.
ptoLightCopyHFSQLContextTriggers 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.
ptoMainThreadRuns 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 a previous task Hide the details

<Result> = ParallelTaskExecuteAfter(<Previous task> , <Continuation task>)
<Result>: ParallelTask variable
ParallelTask variable corresponding to the continuation task.
<Previous task>: ParallelTask variable
Name of ParallelTask variable corresponding to the previous task.
<Continuation task>: ParallelTask variable
Name of ParallelTask variable corresponding to the task that will be run after.

Describing a task that will be run after a previous task Hide the details

<Result> = ParallelTaskExecuteAfter(<Previous task> , <Description of continuation task>)
<Result>: ParallelTask variable
ParallelTask variable corresponding to the continuation task.
<Previous task>: ParallelTask variable
Name of ParallelTask variable corresponding to the previous task.
<Description of continuation task>: Description of ParallelTask variable
Name of the Description of ParallelTask variable describing the task that will be run after.
Remarks
  • ParallelTaskExecuteAfter is a non-blocking function.
  • If the function is called while the task is already ended, the continuation will be run as soon as possible.
  • If the function is called while the task is already canceled, the continuation will not be run.
  • If the previous task is canceled while a continuation was created, the continuation will not be run.
  • In the code of the continuation task, the MyPreviousParallelTask keyword is used to handle the previous ended task.
Related Examples:
Using parallel tasks 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.
Business / UI classification: Neutral code
Component: wd290vm.dll
Minimum version required
  • Version 20
This page is also available for…
Comments
Click [Add] to post a comment

Last update: 06/23/2023

Send a report | Local help