TMF Application Programmer's Guide (G06.24+)
HP NonStop TMF Application Programmer’s Guide—522419-004
3-1
3
Designing Multithreaded Processes
Application program modules can be designed as multithreaded processes: for 
example, multithreaded requesters can have many transactions at the same time. 
Having initiated one transaction, a multithreaded requester can then initiate other 
transactions and switch from one transaction to another.
Similarly, a multithreaded server can work on many transactions at the same time. 
Having accepted a work request for one transaction, a multithreaded server can then 
accept work requests for other transactions and switch from one transaction to another.
A program module can even act simultaneously as a requester for one or more 
transactions and as a server for one or more other transactions.
Many concepts and characteristics of requesters and servers remain the same 
regardless of whether they are designed as single-threaded or multithreaded 
processes.
This section contains the following topics:
Multithreaded Requesters
Multithreaded requesters differ from single-threaded requesters in the following ways:
•
Multithreaded requesters must always explicitly open their TFILE with more than 
one entry.
•
Multithreaded requesters use nowait I/O (including nowait ENDTRANSACTION 
calls).
•
Multithreaded requesters use a more complex checkpointing strategy.
These differences are detailed in the following subsections.
Opening the TFILE
To open the TFILE, a multithreaded requester uses FILE_OPEN_ call of the following 
form (illustrated in TAL).
Topic Page
Multithreaded Requesters
3-1
Multithreaded Servers 3-12
Multithreaded Requester/Server Processes 3-14
CALL FILE_OPEN_ ( filename:4 , filenumber , , , 
 nowait-depth );










