STLdoc
STLdocumentation
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros
Static Public Member Functions | List of all members
Concurrency::details::_Originator Class Reference

#include <agents.h>

Static Public Member Functions

template<class _Type >
static bool _send (ITarget< _Type > *_Trg, const _Type &_Data)
 
template<class _Type >
static bool _asend (ITarget< _Type > *_Trg, const _Type &_Data)
 

Member Function Documentation

template<class _Type >
static bool Concurrency::details::_Originator::_asend ( ITarget< _Type > *  _Trg,
const _Type _Data 
)
inlinestatic
13300  {
13301  // If the block can participate in posting messages without requiring a call back, use that
13302  // method of initiating the message rather for efficiency purposes.
13303  if (_Trg != NULL && _Trg->supports_anonymous_source())
13304  {
13305  _AnonymousOriginator<_Type> _Asend_block;
13306  return _Asend_block._internal_asend(_Trg, _Data);
13307  }
13308  else
13309  {
13310  // Needs to be allocated on the heap
13311  _AsyncOriginator<_Type> * _AsyncOrig = new _AsyncOriginator<_Type>;
13312  return _AsyncOrig->_internal_send(_Trg, _Data);
13313  }
13314  }
#define NULL
Definition: crtdbg.h:30
template<class _Type >
static bool Concurrency::details::_Originator::_send ( ITarget< _Type > *  _Trg,
const _Type _Data 
)
inlinestatic
13279  {
13280  if (_Trg != NULL && _Trg->supports_anonymous_source())
13281  {
13282  // _send will block until the message is accepted/rejected.
13283  // Note that this invokes the send method on the target which
13284  // would synchronously process the message.
13285  _AnonymousOriginator<_Type> _Send_block;
13286  return _Send_block._internal_send(_Trg, _Data);
13287  }
13288  else
13289  {
13290  // Create a blocking originator on the stack. _send will block until the
13291  // message is accepted/rejected.
13292  _SyncOriginator<_Type> _Orig;
13293  return _Orig._internal_send(_Trg, _Data);
13294  }
13295  }
#define NULL
Definition: crtdbg.h:30

The documentation for this class was generated from the following file: