SourcePro DB : DB Interface Module User’s Guide : PART III Using Advanced Features : Asynchronous Usage : Handling C++ Datatype Returns from an Asynchronous Call
Handling C++ Datatype Returns from an Asynchronous Call
There are some instances when an asynchronous function may return a C++ datatype instead of a DB Interface Module datatype. In these instances, the producer object itself becomes a future object by changing its status to notReady. Applications can query the isReady() method of the producer object to determine whether an asynchronous call is complete. When accessed in these instances, the producer object behaves like any other future object.
For example, RWDBReader::operator() returns a void * which is a C++ datatype. When this operator is executed from an asynchronous RWDBReader, the RWDBReader that produced void * behaves like a future object, changing its status to notReady.