RWTThreadEscrowImp<Redeemable> RWTEscrowImp<Redeemable>
#include <rw/thread/RWTThreadEscrowImp.h>
This is a concrete implementation of the RWTEscrowImp<Redeemable> class. It is multi-thread safe and uses condition variables to communicate between threads.
This class should not be used directly. It is intended to be used through the RWTIOUResult<Redeemable> and RWTIOUEscrow<Redeemable> interfaces. However, you may wish to use the static make() functions provided by this class, instead of the global rwtMakeThreadIOU() helper functions, in order to construct an escrow instance.
#include <rw/thread/RWTThreadEscrowImp.h> // for // RWTThreadEscrowImp #include <rw/itc/RWTIOUResult.h> // for RWTIOUResult #include <rw/itc/RWTIOUEscrow.h> // for RWTIOUEscrow // create a new RWTThreadEscrowImp<int> impl., // and use it to initialize RWTIOUResult<int>. RWTIOUResult<int> intRes = RWTThreadEscrowImp<int>::make(); // make an RWTIOUEscrow<int> handle that points // to same RWTThreadEscrowImp<int> as intRes. RWTIOUEscrow<int> intEsc = intRes; // create a new RWTThreadEscrowImp<RWCString>, // use it to initialize an RWTIOUEscrow<RWCString> RWTIOUEscrow<RWCString> strEsc = RWTThreadEscrowImp<RWCString>::make(); // just for the sake of demonstration, make an // RWTIOUResult<RWCString> that points to same // RWTThreadEscrowImp<RWCString> as strEsc. RWTIOUResult<int> strRes = strEsc;
typedef Redeemable RedeemableType;
RWTThreadEscrowImp(void);
The constructor for this class is private. You must use the static make() members to create instances.
virtual ~RWTThreadEscrowImp(void)
Virtual destructor.
static RWTEscrowHandle<Redeemable> make(void)
Creates a new RWTThreadEscrowImp<Redeemable>. Returns an RWTEscrowHandle<Redeemable> handle which can be used to create an RWTIOUResult<Redeemable> or RWTIOUEscrow<Redeemable> handle to the newly-created Escrow implementation.
static RWTEscrowHandle<Redeemable> make(const Redeemable& immediateValue);
Create an RWTThreadEscrowImp<Redeemable> and assign it to an RWTEscrowHandle<Redeemable>. The escrow is closed immediately with immediateValue. The returned RWTEscrowHandle<Redeemable> can be used to initialize an RWTIOUEscrow<Redeemable> or RWTIOUResult<Redeemable>. Once the escrow is created it is immediately redeemable.
RWTIOUResult<Redeemable>, RWTIOUEscrow<Redeemable>, RWTEscrowImp<Redeemable>
©Copyright 2000, Rogue Wave Software, Inc.
Contact Rogue Wave about documentation or support issues.