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
4295  {
4296  // If the block can participate in posting messages without requiring a call back, use that
4297  // method of initiating the message rather for efficiency purposes.
4298  if (_Trg != NULL && _Trg->supports_anonymous_source())
4299  {
4300  _AnonymousOriginator<_Type> _Asend_block;
4301  return _Asend_block._internal_asend(_Trg, _Data);
4302  }
4303  else
4304  {
4305  // Needs to be allocated on the heap
4306  _AsyncOriginator<_Type> * _AsyncOrig = new _AsyncOriginator<_Type>;
4307  return _AsyncOrig->_internal_send(_Trg, _Data);
4308  }
4309  }
#define NULL
Definition: vcruntime.h:236
template<class _Type >
static bool Concurrency::details::_Originator::_send ( ITarget< _Type > *  _Trg,
const _Type &  _Data 
)
inlinestatic
4274  {
4275  if (_Trg != NULL && _Trg->supports_anonymous_source())
4276  {
4277  // _send will block until the message is accepted/rejected.
4278  // Note that this invokes the send method on the target which
4279  // would synchronously process the message.
4280  _AnonymousOriginator<_Type> _Send_block;
4281  return _Send_block._internal_send(_Trg, _Data);
4282  }
4283  else
4284  {
4285  // Create a blocking originator on the stack. _send will block until the
4286  // message is accepted/rejected.
4287  _SyncOriginator<_Type> _Orig;
4288  return _Orig._internal_send(_Trg, _Data);
4289  }
4290  }
#define NULL
Definition: vcruntime.h:236

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