Guardian Programmer's Guide

Table Of Contents
Using Nowait Input/Output
Guardian Programmer’s Guide 421922-014
4 - 2
Overview of Nowait Input/Output
When you use nowait I/O, however, you typically do so for one of the following
reasons:
To apply a time limit to an operation
To support multiple independent logical processing threads in a single program
The ability to overlap application processing with I/O operations is often secondary.
To use nowait I/O, you need to do the following:
Set the nowait parameter in the FILE_OPEN_ call to specify nowait I/O on all
operations to the file that use the returned file number.
Use calls to the AWAITIO[X] procedure to check for or wait for completion of the
I/O operation.
Figure 4-1. Waited and Nowait I/O
Note. It is important to distinguish between the FILE_OPEN_ nowait parameter and the
nowait bit in the FILE_OPEN_ option parameter. The nowait parameter allows you to
establish nowait access to the file once the file is open. The nowait bit in the option
parameter allows you to perform the open operation itself in a nowait manner. All combinations
are possible in the same call except that you cannot have a nowait open operation and permit
waited I/O operations on the same file.
VST020.VSD