The ⇘ “CAA 指南” for libraries prescribe, that a function, whose execution time depends on external devices or are influenced by parameter values, is executed asynchronously.
For this reason this library provides a completely generic mechanism for executing function asynchronously. This mechanism will be called Async Manager.
Each function to be executed asynchronously is in need of an unique identifier. The identifier is a 32 bit value being composed of a library identifier (high word) and a function identifier (low word). The library identifier for a particular library is prescribed by the document Prefix.pdf. The function identifier of a library has to be specified within the documentation of that library.
For each call to a function a so called "job" will be created. The job being always in a predefined state forms the basic module of the Async Manager. By use of the access functions of the Async Manager the execution of a job may be started or aborted, a job may be deleted and the user may get information on the state of this job. Depending on the implementation an error code and an indication of progress may be read out in addition to the actual state.
As the Async Manager shall provide a purely generic mechanism, its functions are responsible for managing the jobs and initiating specified steps, but not for executing the jobs.
For the execution of the jobs so called "workers" are in charge. A worker is an instance of the structure type ASM.IWORKER. Thereby a worker implements an interface. For each function to be executed asynchronously such a worker has to be registered in advance. The Asnync Manager will then use the worker to execute the particular steps.