PC SOFT

ONLINE HELP
FOR WINDEV, WEBDEV AND WINDEV MOBILE

Home | Sign in | English US
  • Managing the multi-processors
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
ThreadMode (Function)
In French: ThreadMode
Modifies the management modes of threads. The available management modes are as follows:
  • the automatic or manual management of the critical sections on the procedures and on the methods.
  • the distribution of the execution of the threads on the different processors or on the different cores of the computer.
The automatic critical sections prevent the execution of a procedure or method by several threads simultaneously. The automatic critical sections are enabled by default.
AndroidAndroid Widget Universal Windows 10 AppJava ThreadMode has no effect: the management mode is always multi-processor, with manual management of critical sections.
Versions 15 and later
Android This function is now available for the Android applications.
New in version 15
Android This function is now available for the Android applications.
Android This function is now available for the Android applications.
Versions 18 and later
Universal Windows 10 App This function is now available in Windows Store apps mode.
Android Widget This function is now available in Android Widget mode.
New in version 18
Universal Windows 10 App This function is now available in Windows Store apps mode.
Android Widget This function is now available in Android Widget mode.
Universal Windows 10 App This function is now available in Windows Store apps mode.
Android Widget This function is now available in Android Widget mode.
Versions 19 and later
WINDEVLinux This function is now available for the WINDEV applications in Linux.
WEBDEV - Server codeLinux This function is now available for the WEBDEV sites in Linux.
iPhone/iPad This function is now available for the iPhone/iPad applications.
New in version 19
WINDEVLinux This function is now available for the WINDEV applications in Linux.
WEBDEV - Server codeLinux This function is now available for the WEBDEV sites in Linux.
iPhone/iPad This function is now available for the iPhone/iPad applications.
WINDEVLinux This function is now available for the WINDEV applications in Linux.
WEBDEV - Server codeLinux This function is now available for the WEBDEV sites in Linux.
iPhone/iPad This function is now available for the iPhone/iPad applications.
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.
Syntax

Modifying the management modes of threads Hide the details

<Result> = ThreadMode(<New Management Modes>)
<Result>: Integer
Management modes of threads before the modification, combination of the constants below.
<New Management Modes>: Constant or combination of constants
Mode for managing the critical sections of procedures and methods:
threadAuto
(Default value)
Automatic management of critical sections: each procedure or method can be run by a single thread at a time.
threadCriticalSectionManual management of critical sections: each procedure or method can be run by several threads simultaneously. In this case, you must protect the accesses to the resources shared between the different threads by critical sections.
Distribution of the threads on the processors or on the cores:
threadMultiProcessor
(Default value)
The threads are automatically distributed among the different processors or among the different cores.
threadMonoProcessorAll the threads of the application are run on a single processor or on a single core.
AndroidAndroid Widget Universal Windows 10 App The constants corresponding to the repartition of the threads on the processors or on the cores are not available.

Retrieving the management modes of threads Hide the details

<Result> = ThreadMode()
<Result>: Integer constant (or combination of constants)
Current management modes of threads:
Mode for managing the critical sections of procedures and methods:
threadAuto
(Default value)
Automatic management of critical sections: each procedure or method can be run by a single thread at a time.
threadCriticalSectionManual management of critical sections: each procedure or method can be run by several threads simultaneously. In this case, you must protect the accesses to the resources shared between the different threads by critical sections.
Distribution of the threads on the processors or on the cores:
threadMultiProcessor
(Default value)
The threads are automatically distributed among the different processors or among the different cores.
threadMonoProcessorAll the threads of the application are run on a single processor or on a single core.
AndroidAndroid Widget Universal Windows 10 App The constants corresponding to the repartition of the threads on the processors or on the cores are not available.
Remarks

Managing the multi-processors

This option should only be used in some advanced cases.
On a single-core single-processor computer, the threadMonoProcessor and threadMultiProcessor constants have no influence.
On a multi-core or multi-processor computer:
  • The threadMonoProcessor mode forces the application to use a single processor or a single core.
  • The threadMultiProcessor mode is used to restore the standard operating mode: in this case, the system automatically manage the distribution of the threads on the processors or on the cores.
Components
WINDEVWEBDEV - Server codeReports and Queries wd230vm.dll
Windows Mobile wp230vm.dll
Java wd230java.jar
Linux wd230vm.so
Android wd230android.jar
Minimum required version
  • Version 9
This page is also available for…
Comments
Click [Add] to post a comment