Guardian Programmer's Guide

Table Of Contents
Writing a Server Program
Guardian Programmer’s Guide 421922-014
22 - 2
Receive-Depth
Receive-Depth
The receive-depth parameter is used by servers for opening $RECEIVE. This
parameter determines how many times the server can call READUPDATE before it has
to call REPLY.
Figure 22-1. Single-Threaded and Multithreaded Servers
Receive-depth value Description
0 Indicates that no calls to READUPDATE can be made. The server
m
ust use READ to receive messages. REPLY is not allowed (the
file system completes the message exchange as soon as the
message is read).
1
I
s used for single-threaded servers (only one message is
processed at a time by the server). In this case, if the requester
has an active TMF transaction at the time the message is sent,
the transaction is automatically made current in the server. When
REPLY is called, the transaction is reset.
> 1 (greater than 1) Is used for multithreaded servers (multiple messages are
p
rocessed simultaneously by the server). If a multithreaded
server is used by requesters with active TMF transactions, the
server must call ACTIVATERECEIVETRANSID and pass the
message tag value returned by FILE_GETRECEIVEINFO_, in
order to make a previous TMF transaction current. Note that even
though the server can have up to receive-depth messages
queued internally, it can have only one current TMF transaction at
a time.
VST108.VSD