Export (0) Print
Expand All

ISource::accept Method

When overridden in a derived class, accepts a message that was offered by this ISource block, transferring ownership to the caller.

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

_MsgId

The runtime_object_identity of the offered message object.

_PTarget

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

A pointer to the message that the caller now has ownership of.

The accept method is called by a target while a message is being offered by this ISource block. The message pointer returned may be different from the one passed into the propagate method of the ITarget block, if this source decides to make a copy of the message.

Header: agents.h

Namespace: concurrency

Show:
© 2014 Microsoft