PC SOFT

ONLINE HELP
FOR WINDEV, WEBDEV AND WINDEV MOBILE

Home | Sign in | English US
  • Overview
  • From simple management to advanced management of threads
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
Overview
WINDEV and WINDEV Mobile propose several functions used to perform an advanced management of threads.
The threads are used to run a code (or processes) in parallel of main application. Therefore, several processes can be run in background task without locking the main application.
The threads replace some types of timers.
An efficient thread is a thread that waits for an event such as a user action, an incoming email, an incoming phone call, ...
Examples for using threads:
  • Retrieving emails in background task while typing a new email for example.
  • Communication application: managing the phone calls, communication by socket, ...
Versions 17 and later
Universal Windows 10 App This feature is now available for the Windows Phone applications.
New in version 17
Universal Windows 10 App This feature is now available for the Windows Phone applications.
Universal Windows 10 App This feature is now available for the Windows Phone applications.
Versions 18 and later
Universal Windows 10 App This feature is now available in Windows Store apps mode.
Android Widget This feature is now available in Android Widget mode.
New in version 18
Universal Windows 10 App This feature is now available in Windows Store apps mode.
Android Widget This feature is now available in Android Widget mode.
Universal Windows 10 App This feature is now available in Windows Store apps mode.
Android Widget This feature is now available in Android Widget mode.
Versions 21 and later
Universal Windows 10 App This feature is now available in Universal Windows 10 App mode.
New in version 21
Universal Windows 10 App This feature is now available in Universal Windows 10 App mode.
Universal Windows 10 App This feature is now available in Universal Windows 10 App mode.
From simple management to advanced management of threads
WINDEV proposes several features for managing threads:
  • Running threads.
    See Principle for running threads for more details
  • Managing the semaphores in the threads, which means limiting the simultaneous execution of a code by one or more threads at a given time. A semaphore can be shared between several applications.
    See Managing the semaphores in the threads: limiting the simultaneous code execution for more details.
  • Versions 16 and later
    Managing the mutexes in order to limit the simultaneous execution of a code to one thread at a given time. A mutex can be shared between several applications.
    See Managing the mutexes in the threads for more details.
    New in version 16
    Managing the mutexes in order to limit the simultaneous execution of a code to one thread at a given time. A mutex can be shared between several applications.
    See Managing the mutexes in the threads for more details.
    Managing the mutexes in order to limit the simultaneous execution of a code to one thread at a given time. A mutex can be shared between several applications.
    See Managing the mutexes in the threads for more details.
  • Managing the critical sections in order to limit the simultaneous execution of a code to one thread at a given time in a single application.
  • Managing signals in order to perform a synchronization between several threads.
    See Synchronizing threads via signals for more details.
Related Examples:
The threads Unit examples (WINDEV): The threads
[ + ] Using threads in an application:
- Run a procedure in thread format
- Stop a thread
- Run a procedure that expects parameters in thread format
The threads Unit examples (WINDEV Mobile): The threads
[ + ] Using threads in an application:
- run a procedure in thread format
- stop a thread
- run a procedure that expects parameters in thread format
The threads (pool) Unit examples (WINDEV): The threads (pool)
[ + ] Using threads:
- Running processes started in parallel
- Limiting the number of threads in execution at a given time
Reminder: A thread is a process running in parallel to the current application (main thread).
This allows you to run a task in background task for example (backup, ...).
Threads are very useful in the industry: supervisor, applications with real-time process check, and so on …
WD Using sockets Training (WINDEV): WD Using sockets
[ + ] This example presents the use of the "Socket" functions of WINDEV in Client/Server.
The following topics are presented in this example:
1/ How to connect to a socket
2/ How to accept a request for connection
3/ How to write or read on a socket
Summary of the example supplied with WINDEV:
This example presents the different functions for socket management supplied with WINDEV. To use this example, a first instance of the example must be started in "server" mode. Then, by specifying the name of the computer that will be used as server and a nickname, you can connect to this application in "client" mode. You now have the ability to send messages to all the connected users. In this example, a thread and a socket are associated with each connection.
WD Video surveillance Complete examples (WINDEV): WD Video surveillance
[ + ] This example explains how to broadcast images coming from a Web camera via a network (Intranet, Internet).
The following topics are presented in this example:
1/ Web Camera control
2/ Using the Socket functions
3/ Using the Thread function
4/ Detecting movements
Summary of the example supplied with WINDEV:
This example is used to broadcast the images captured by a Web Camera via a network (Intranet, Internet)
This application groups the "Diffusion server" part and the "Monitor" part.
It allows you to:
- broadcast the images of the Web Camera
- select a "monitor"
- analyze the image to detect a movement. In this case, the relevant recipients (or "monitors") can be notified
- connect up to 8 different Web Cameras and enable the detection of movements
Minimum required version
  • Version 9
This page is also available for…
Comments
Click [Add] to post a comment