Tuto WINDEV 25
414 Part 7: Advanced programming Definition The threads are used to run a code (or processes) in parallel of main application. Therefore, several long processes can be run in background task without locking the main application (also called "Main thread"). The threads replace some types of timers. In most cases, a secondary thread is used to detect an event such as a user action, an incoming email, a phone call, ... Examples for using threads: • Retrieving emails in background task while typing a new email. • Communication application: managing the phone calls, communication by socket, ... WINDEV allows you to: • manage the threads ( Thread * functions). • use "signals" in order to synchronize several threads ( Signal * functions). • use the threads with "semaphores" in order to manage the access to the resources shared by different threads ( Semaphore * functions). Example Example WINDEV is supplied with several unit examples allowing you to understand the benefit and the use of threads: • The threads (Pool). • The threads. See the online help for more details (keyword: "Thread").
Made with FlippingBook
RkJQdWJsaXNoZXIy NDQ0OA==