다음을 통해 공유


ISource::reserve Method

When overridden in a derived class, reserves a message previously offered by this ISource block.

virtual bool reserve(
   runtime_object_identity _MsgId,
   _Inout_ ITarget<_Type> * _PTarget
) = 0;

Parameters

  • _MsgId
    The runtime_object_identity of the offered message object.

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

Return Value

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, and so forth.

Remarks

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.

Requirements

Header: agents.h

Namespace: concurrency

See Also

Reference

ISource Class