Condividi tramite


propagator_block::propagate Method

Asynchronously passes a message from a source block to this target block.

virtual message_status propagate(
   _Inout_opt_ message<_Source_type> * _PMessage,
   _Inout_opt_ ISource<_Source_type> * _PSource
);

Parameters

  • _PMessage
    A pointer to the message object.

  • _PSource
    A pointer to the source block offering the message.

Return Value

A message_status indication of what the target decided to do with the message.

Remarks

The propagate method is invoked on a target block by a linked source block. It queues up an asynchronous task to handle the message, if one is not already queued or executing.

The method throws an invalid_argument exception if either the _PMessage or _PSource parameter is NULL.

Requirements

Header: agents.h

Namespace: concurrency

See Also

Reference

propagator_block Class