4D v13.4Processes |
||
|
4D v13.4
Processes
Processes
Multi-tasking in 4D is the ability to have distinct database operations that are executed simultaneously. These operations are called processes. Multiple processes are like multiple users on the same computer, each working on his or her own task. This essentially means that each method can be executed as a distinct database task.
Note: This section does not cover stored procedures. See the section Stored Procedures in the 4D Server Reference manual. There are several ways to create a new process:
A process can be cleared under the following conditions. The first two conditions are automatic:
A process can create another process. Processes are not organized hierarchically—all processes are equal, regardless of the process from which they have been created. Once the “parent” process creates a “child” process, the child process will continue regardless of whether or not the parent process is still executing. Each process contains specific elements. There are three types of distinctly different elements in a process:
Interface elements consist of the following:
Note: Processes that are executed on the server (stored procedures) must not contain elements of the interface. Data elements refer to the data used by the database. The data elements are:
Note: This description of the data elements is valid if your processes are global in scope. By default, all processes are global. See the “Global and Local Processes” section below. The language elements of a process are the elements related to programming in 4D.
User processes are processes that you create to perform certain tasks. They share processing time with the kernel processes. As an example, Web connection processes are user processes. The 4D application also creates processes for its own needs. The following processes are created and managed by 4D:
Processes can be either global or local in scope. By default, all processes are global. Global processes can perform any operation, including accessing and manipulating data. In most cases, you will want to use global processes. Local processes should be used only for operations that do not access data. For example, you can use a local process to run an event-handling method or to control interface elements such as floating windows. You specify that a process is local in scope through its name. The name of local process must start with a dollar sign ($). Warning: If you attempt to access data from a local process, you access it though the main process, risking conflicts with operations performed within that process. 4D Server: Using local processes on the Client side for operations that do not require data access reserves more processing time for server-intensive tasks. A record is locked when another process has successfully loaded the record for modification. A locked record can be loaded by another process, but cannot be modified. The record is unlocked only in the process in which the record is being modified. A table must be in read/write mode for a record to be loaded unlocked. For more information, refer to the Record Locking section. |
PROPERTIES
Product: 4D SEE ALSO
Methods |