The example components NAMES and NAMEDIR are both designed to respond to
requests in a synchronous manner. The component processes each request as
it is received and does not process subsequent requests until the previous
request has been answered.
You can take a synchronous component and modify it to function asynchronously
by doing the following:
- Create a thread that is blocked until a command is
received from a management application.
- When the command is received, the component instrumentation
queues the command to the waiting thread and returns from the DmiCiInvoke()
function call immediately. The service layer continues operation and does
not call the component again until the first command has completed.
- The thread processes the command just as it would
in a synchronous situation, but after the thread issues the callback to
the service layer, it returns to the blocked state or terminates.
This enables the service layer to process other requests.
[Back]
[Next]