Next: Control Library Exports, Up: Control Library [Index]
The control library objects expose a collection of interfaces concerned with I/O polling and activity scheduling.
The described ‘dispatch’ data type identifies control management (dispatcher) objects. I/O channels and activities are recorded against such objects and through them the I/O is monitored and the schedules kept.
The registerable I/O channels are objects of the ‘file’ type.
See File Library.
I/O polling best applies to files operating in nonblocking mode and files operating in other modes may not be allowed for registration. File operation mode tests are performed also before data transfer.
See Nonblocking I/O.
The registered ‘file’ objects are retained and they will survive even if no other reference is made to them. They may be deregistered explicitly and they will be deregisted automatically in certain events.
Input files are registered together with a function and the arguments for the function. When input is available, the recorded function is called.
Output files are polled until drained, then automatically deregistered.
Events may be scheduled at prescribed times, with the time definitions coming as ‘date’ objects.
A function together with the arguments for its call is recorded for scheduled events and it is called at the prescribed time.
The time prescribing ‘date’ object may be optionally recorded and retained and can be used to identify the scheduled event with the dispatcher object.
Identifiable events may be canceled.
Activities may be registered for the times when there is nothing to do.
A function together with the arguments for its call is recorded for queued activities and it is called to press the activity.
An object is recorded and retained for any registered activity and it can be used to identify the activity with the dispatcher object.
Activities may be expired (deregistered).
The I/O channels are monitored and the schedules are kept only when the recording ‘dispatch’ objects are executed. The execution completes when there’s nothing left recorded or on explicit command.
Functions taking reference arguments are not registered.
See Pass By Reference.
All the objects relevant to the programmed I/O monitoring, time events and activities are retained and will survive for as long as they are relevant.
Next: Control Library Exports, Up: Control Library [Index]