PFUNC  1.0
Public Types | Public Member Functions | Public Attributes
pfunc::detail::group_predicate_pair< PolicyName, ValueType > Struct Template Reference

#include <pfunc/predicate.hpp>

List of all members.

Public Types

typedef bool result_type
typedef ValueType * value_type

Public Member Functions

 group_predicate_pair (value_type previous_task)
bool own_pred (value_type current_task) const
bool steal_pred (value_type current_task) const

Public Attributes

value_type previous_task

Detailed Description

template<typename PolicyName, typename ValueType>
struct pfunc::detail::group_predicate_pair< PolicyName, ValueType >

Predicate type for getting tasks out at a "group" scheduling point.


Member Typedef Documentation

template<typename PolicyName , typename ValueType >
typedef bool pfunc::detail::group_predicate_pair< PolicyName, ValueType >::result_type
template<typename PolicyName , typename ValueType >
typedef ValueType* pfunc::detail::group_predicate_pair< PolicyName, ValueType >::value_type

Constructor & Destructor Documentation

template<typename PolicyName , typename ValueType >
pfunc::detail::group_predicate_pair< PolicyName, ValueType >::group_predicate_pair ( value_type  previous_task) [inline]

Initialize the previous task.


Member Function Documentation

template<typename PolicyName , typename ValueType >
bool pfunc::detail::group_predicate_pair< PolicyName, ValueType >::own_pred ( value_type  current_task) const [inline]

Can this task be given to the calling thread? The answer is "As long as the previous and current task's are not in the same group". If they are in the same group, there can be a deadlock.

Parameters:
[in]current_taskPointer to the task that is being chosen.
template<typename PolicyName , typename ValueType >
bool pfunc::detail::group_predicate_pair< PolicyName, ValueType >::steal_pred ( value_type  current_task) const [inline]

Same as own_pred ()

Parameters:
[in]current_taskPointer to the task that is being chosen.

Member Data Documentation

template<typename PolicyName , typename ValueType >
value_type pfunc::detail::group_predicate_pair< PolicyName, ValueType >::previous_task

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