Was this page helpful?
Your feedback about this content is important. Let us know what you think.
Additional feedback?
1500 characters remaining
Export (0) Print
Expand All

choice::reserve Method

Reserves a message previously offered by this choice messaging block.

virtual bool reserve(
   runtime_object_identity _MsgId,
   ITarget<size_t> * _PTarget
);

_MsgId

The runtime_object_identity of the message object being reserved.

_PTarget

A pointer to the target block that is calling the reserve method.

true if the message was successfully reserved, false otherwise. Reservations can fail for many reasons, including: the message was already reserved or accepted by another target, the source could deny reservations, etc.

After you call reserve, if it succeeds, you must call either consume or release in order to take or give up possession of the message, respectively.

Header: agents.h

Namespace: Concurrency

Community Additions

ADD
Show:
© 2015 Microsoft