Waits for a reply of a specific request. To enable waiting, an identification number has to be associated with the request. The identification number can be specified via an optional parameter of the IiopRequest function.
IIOP.bdh
IiopWaitForReply( in hIiop : number, in nId : number ): boolean;
true if successful
false otherwise
Parameter | Description |
---|---|
hIiop | Handle to a CORBA object |
nId |
Identification number of the request to wait for. A reply from the specified request has to be received before the simulation continues
|
dcltrans transaction TMain const ID_JIM := 1; // identification numbers ID_BOB := 2; var hBank, hJim, hBob: number; begin // retrieve handle to Bank/AccountManager ... // open an account for Jim IiopSetString(hBank, "Jim"); IiopRequest(hBank, "open", IIOP_NON_BLOCKING, ID_JIM); // open an account for Bob IiopSetString(hBank, "Bob"); IiopRequest(hBank, "open", IIOP_NON_BLOCKING, ID_BOB); // do anything else ... // wait until Jim's account has been opened IiopWaitForReply(hBank, ID_JIM); IiopGetObject(hBank, hJim); // wait until Bob's account has been opened IiopWaitForReply(hBank, ID_BOB); IiopGetObject(hBank, hBob); // release object IiopObjectRelease(hBank); IiopObjectRelease(hJim); IiopObjectRelease(hBob); end TMain;
AsyncBank.bdf, SimpleAsyncBank.bdf, AsyncFact.bdf, AsyncOdb.bdf
You can find the sample script(s) here: <Public documents>\Silk Performer <version>\Samples\Corba