- Main Page
- Modules
- Namespaces
- Classes
- Files
- Related Pages

- Class List
- Class Hierarchy
- Class Members

# tbb::continue_receiver Class Reference

Base class for receivers of completion messages. More...

`#include <graph.h>`

Inheritance diagram for tbb::continue_receiver:

List of all members.

## Public Types
typedef continue_msg | input_type
| The input type.
typedef sender< continue_msg > | predecessor_type
| The predecessor type for this node.
## Public Member Functions
| continue_receiver (int number_of_predecessors=0)
| Constructor.
virtual | ~continue_receiver ()
| Destructor.
bool | register_predecessor (predecessor_type &)
| Increments the trigger threshold.
bool | remove_predecessor (predecessor_type &)
| Decrements the trigger threshold.
bool | try_put (input_type)
| Puts a continue_msg to the receiver.
## Protected Member Functions
virtual void | execute ()=0
| Does whatever should happen when the threshold is reached.
## Protected Attributes
spin_mutex | my_mutex
int | my_predecessor_count
int | my_current_count

## Detailed Description

Base class for receivers of completion messages.

These receivers automatically reset, but cannot be explicitly waited on

## Member Function Documentation

virtual void tbb::continue_receiver::execute | ( |  | ) | `[protected, pure virtual]`

Does whatever should happen when the threshold is reached.

This should be very fast or else spawn a task. This is called while the sender is blocked in the try_put().

bool tbb::continue_receiver::remove_predecessor | ( | predecessor_type & |  | ) | `[inline]`

Decrements the trigger threshold.

Does not check to see if the removal of the predecessor now makes the current count exceed the new threshold. So removing a predecessor while the graph is active can cause unexpected results.

bool tbb::continue_receiver::try_put | ( | input_type |  | ) | `[inline]`

Puts a continue_msg to the receiver.

If the message causes the message count to reach the predecessor count, execute() is called and the message count is reset to 0. Otherwise the message count is incremented.

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

- graph.h

Copyright © 2005-2011 Intel Corporation. All Rights Reserved.

Intel, Pentium, Intel Xeon, Itanium, Intel XScale and VTune are registered trademarks or trademarks of Intel Corporation or its subsidiaries in the United States and other countries.

* Other names and brands may be claimed as the property of others.