# IBM Visualization Data Explorer Programmer's Reference

[ Bottom of Page | Previous Page | Next Page | Table of Contents | Partial Table of Contents | Index ]

## 11.2 Asynchronous Modules

Inboard, outboard, and runtime-loadable modules can be asynchronous. That is, depending on events external to Data Explorer, an asynchronous module can request that it be rerun. If Data Explorer is in execute-on-change mode, the module will reexecute immediately. If it is not, the module is called the next time the user runs the network.

To cause executions in this fashion, the ASYNC flag must be set in the module's `.mdf` file. Then it can call the DXReadyToRun() function to request reexecution. (For an example of how to use this function, see the sample outboard files "async.c" and "watchfile.c" in `/usr/lpp/dx/samples/outboard`.) If the module is outboard, the PERSISTENT flag must also be set, so that it does not exit after each execution.

DXReadyToRun() can be called in a variety of ways: by a signal handler (signal), after a prescribed time interval has passed (sleep, alarm), when a file appears (stat), or when data is received across a pipe or socket from another process (select).

If a module must wait for input associated with a file descriptor (e.g., a socket), it should use DXRegisterInputHandler to add another file descriptor to the select list. If data is received along with the input associated with that file descriptor, a user-supplied routine is called to check the status and may call DXReadyToRun. When the module is called, it can read the information in, process it, and return the output(s).

[ Top of Page | Previous Page | Next Page | Table of Contents | Partial Table of Contents | Index ]
[Data Explorer Documentation | QuickStart Guide | User's Guide | User's Reference | Programmer's Reference | Installation and Configuration Guide ]

[Data Explorer Home Page | Contact Data Explorer | Same document on Data Explorer Home Page ]

[IBM Home Page | Order | Search | Contact IBM | Legal ]