The sample program, ThreadExample.m3
illustrates
multi-threading programming. Using the
Thread interface, you can create
concurrent activities for different portions of your program.
Suppose, for example, you would like to update the user interface
screens while doing a long-running query to a database. Using threads,
you can deal with each one of these tasks separately from each other.
The Thread
interface also provides operations for
communication and synchronization between threads.
Standard Modula-3 libraries are thread-friendly. Some Modula-3 libraries use threads in order to perform background activities.