PC SOFT

ONLINE HELP
FOR WINDEV, WEBDEV AND WINDEV MOBILE

WINDEV
WindowsLinuxUniversal Windows 10 AppJavaReports and QueriesUser code (UMC)
WEBDEV
WindowsLinuxPHPWEBDEV - Browser code
WINDEV Mobile
AndroidAndroid Widget iPhone/iPadApple WatchUniversal Windows 10 AppWindows Mobile
Others
Stored procedures
ParallelTaskExecuteAfterOne (Function)
In French: TâcheParallèleExécuteAprèsUne
Indicates a continuation parallel task that will be run once the first task is ended in an array of parallel tasks.
Versions 21 and later
Apple Watch This function is now available in Apple Watch mode.
Universal Windows 10 App This function is now available in Universal Windows 10 App mode.
New in version 21
Apple Watch This function is now available in Apple Watch mode.
Universal Windows 10 App This function is now available in Universal Windows 10 App mode.
Apple Watch This function is now available in Apple Watch mode.
Universal Windows 10 App This function is now available in Universal Windows 10 App mode.
Versions 23 and later
Java This function is now available for the Java applications.
Android Widget This function is now available in Android Widget mode.
Android This function is now available for the Android applications.
New in version 23
Java This function is now available for the Java applications.
Android Widget This function is now available in Android Widget mode.
Android This function is now available for the Android applications.
Java This function is now available for the Java applications.
Android Widget This function is now available in Android Widget mode.
Android This function is now available for the Android applications.
Example
// Starts two tasks
t1 is ParallelTask = ParallelTaskExecute(Proc1)
t2 is ParallelTask = ParallelTaskExecute(Proc2)
// The ContinuationProc procedure will be run when one of the two tasks is ended
ParallelTaskExecuteAfterOne([t1,t2], ContinuationProc)
Syntax

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

<Result> = ParallelTaskExecuteAfterOne(<Previous Tasks> , <Continuation Procedure> [, <Parameters> [, <Options>]])
<Result>: ParallelTask variable
ParallelTask variable corresponding to the created continuation task.
<Previous Tasks>: Array of ParallelTasks
Name of the array of ParallelTask variables corresponding to the previous tasks.
<Continuation Procedure>: Character string or Procedure variable
Continuation procedure to run. This parameter can correspond to:
  • the name of the continuation procedure to run.
  • the name of 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.
The ReturnedValuePreviousTask keyword is used to pass the return values of the first previous ended task in parameter of continuation procedure
<Options>: Optional Integer constant
Options of task to run:
ptoFullCopyHFSQLContextTriggers the immediate copy of current HFSQL context.
Recommended for example if the parallel task must take into account the current positions in the files and queries of caller context.
ptoDelayedCopyHFSQLContext
(Default value)
Triggers a light copy of HFSQL context during the first access to the HFSQL data.
ptoLightCopyHFSQLContextTriggers the immediate copy of part of 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.

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

<Result> = ParallelTaskExecuteAfterOne(<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 variables corresponding to the previous tasks.
<Continuation Task>: ParallelTask variable
Name of ParallelTask variable corresponding to the continuation task.

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

<Result> = ParallelTaskExecuteAfterOne(<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 variables corresponding to the tasks run.
<Description of Continuation Task>: Description of ParallelTask variable
Name of Description of ParallelTask variable describing the continuation task.
Remarks
  • ParallelTaskExecuteAfterOne is a non-locking function.
  • If the function is called while one of the tasks is already ended, the continuation will be run as soon as possible.
  • If the function is called while all the tasks have been canceled, the continuation will not be run.
  • If all the previous task are 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 first previous task ended.
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.
Components
WINDEVWEBDEV - Server codeReports and Queries wd230vm.dll
Java wd230java.jar
Linux wd230vm.so
Android wd230android.jar
Minimum required version
  • Version 20
This page is also available for…
Comments
Click [Add] to post a comment