Guardian Programmer's Guide

Table Of Contents
Communicating With Processes
Guardian Programmer’s Guide 421922-014
6 - 9
Queuing Messages on $RECEIVE
To reorder the message queue according to message priority, the server process must
issue SETMODE function 36 as follows:
LITERAL PRIORITY^QUEUING = 36,
ON = 1,
OFF = 0;
.
.
CALL SETMODE(RECV^NUM,
PRIORITY^QUEUING,
ON);
IF <> THEN ...
The priority of every process is set when the process is created. Refer to Section 16,
Creating and Managing Processes, for details of how to do this using the
PROCESS_CREATE_ procedure.
Figure 6-3 shows how messages are queued according to sender process priority.
Figure 6-3. Message Queuing by Process Priority
VST035.VSD