4D v20.1PROCESS PROPERTIES |
|||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
4D v20.1
PROCESS PROPERTIES
|
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| PROCESS PROPERTIES ( process ; procNom ; procStatut ; procTemps {; procMode {; uniqueID {; origine}}} ) | ||||||||
| Paramètre | Type | Description | ||||||
| process | Entier long |
|
Numéro du process | |||||
| procNom | Chaîne |
|
Nom du process | |||||
| procStatut | Entier long |
|
Statut du process | |||||
| procTemps | Entier long |
|
Temps d'exécution cumulé du process en ticks | |||||
| procMode | Booléen, Entier long |
|
Si booléen : Visible (Vrai) ou Caché (Faux) Si entier long (champ de bits) : bit 0 = Visibilité, bit 1 = Exécution en préemptif |
|||||
| uniqueID | Entier long |
|
Numéro unique du process | |||||
| origine | Entier long |
|
Origine du process | |||||
La commande PROCESS PROPERTIES retourne diverses informations sur le process dont vous passez le numéro dans process.
Note : Si le process n'existe pas, ce qui veut dire que vous n'avez pas passé, dans process, un nombre inclus dans l'intervalle [1>Count tasks], PROCESS PROPERTIES laisse les valeurs des variables passées en paramètres inchangées.
Après l'appel :
| Constante | Type | Valeur |
| Does not exist | Entier long | -100 |
| Aborted | Entier long | -1 |
| Executing | Entier long | 0 |
| Delayed | Entier long | 1 |
| Waiting for user event | Entier long | 2 |
| Waiting for input output | Entier long | 3 |
| Waiting for internal flag | Entier long | 4 |
| Paused | Entier long | 5 |
| Constante | Type | Valeur | Comment |
| Apple event manager | Entier long | -7 | |
| Backup process | Entier long | -19 | |
| Cache manager | Entier long | -4 | |
| Client manager process | Entier long | -31 | |
| Compiler process | Entier long | -29 | |
| Created from execution dialog | Entier long | 3 | |
| Created from menu command | Entier long | 2 | |
| Design process | Entier long | -2 | |
| Event manager | Entier long | -8 | |
| Execute on client process | Entier long | -14 | |
| Execute on server process | Entier long | 1 | |
| External task | Entier long | -9 | |
| HTTP Log flusher | Entier long | -58 | |
| Indexing process | Entier long | -5 | |
| Internal 4D server process | Entier long | -18 | |
| Internal timer process | Entier long | -25 | |
| Log file process | Entier long | -20 | |
| Main 4D process | Entier long | -39 | |
| Main process | Entier long | -1 | |
| Method editor macro process | Entier long | -17 | |
| Monitor process | Entier long | -26 | |
| MSC process | Entier long | -22 | |
| None | Entier long | 0 | |
| On exit process | Entier long | -16 | |
| Other 4D process | Entier long | -10 | |
| Other user process | Entier long | 4 | |
| Restore Process | Entier long | -21 | |
| Serial Port Manager | Entier long | -6 | |
| Server interface process | Entier long | -15 | |
| SOAP process | Entier long | -33 | |
| SQL Method execution process | Entier long | -24 | |
| Web process on 4D remote | Entier long | -12 | |
| Web process with no context | Entier long | -3 | |
| Web server process | Entier long | -13 | |
| Web server spare process | Entier long | -32 | |
| Worker process | Entier long | 5 | Process worker lancé par l’utilisateur |
L'exemple suivant retourne le nom, le statut, et le temps écoulé dans les variables vNom, vStatut, et vTempsPassé pour le process courant :
C_TEXT(vNom) //Initialiser les variables
C_LONGINT(vStatut)
C_LONGINT(vTempsPassé)
PROCESS PROPERTIES(Current process;vNom;vStatut;vTempsPassé)Voir l'exemple de la section Semaphore.
Pour connaître la visibilité et le mode d'exécution du process courant, vous pouvez écrire :
C_TEXT(vNom)
C_LONGINT(vStatut)
C_LONGINT(vDurée)
C_LONGINT(vMode) //peut être déclaré en booléen si on veut juste connaître la visibilité
C_BOOLEAN(estVisible)
C_BOOLEAN(estPreemptif)
PROCESS PROPERTIES(Current process;vNom;vStatut;vDurée;vMode)
estVisible:=vMode?? 0 //vrai si visible
estPreemptif:=vMode?? 1 //vrai si préemptif
Count tasks
Get process activity
Process 4D préemptifs
Process state
Produit : 4D
Thème : Process
Numéro :
336
Modifié : 4D v11 SQL Release 3
Modifié : 4D v15 R5
4D - Langage ( 4D v20)
4D - Langage ( 4D v20.1)
Ajouter un commentaire