Symbian
Symbian Developer Library

SYMBIAN OS V9.4

Feedback

[Index] [Previous] [Next]


How to handle a single asynchronous request

A thread that requests an asynchronous service from another thread can continue processing but eventually reaches a point where it must wait until the asynchronous request is complete before it can resume processing.

Typically, the requester performs the following sequence:

TRequestStatus status;                        // Request status object
someProvider.IssueRequest(parameters,status); // Issue the request
...
User::WaitForRequest(status);                 // Wait for completion
if (status==KErrNone)
    {
    /* success */
    }
else if (status==KErrXxx)
    {
    /* check for some error */
    }
else // check for other error conditions etc.
...

[Top]


Notes