PFUNC
1.0
|
#include <pfunc/predicate.hpp>
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 |
Predicate type for getting tasks out at a "group" scheduling point.
typedef bool pfunc::detail::group_predicate_pair< PolicyName, ValueType >::result_type |
typedef ValueType* pfunc::detail::group_predicate_pair< PolicyName, ValueType >::value_type |
pfunc::detail::group_predicate_pair< PolicyName, ValueType >::group_predicate_pair | ( | value_type | previous_task | ) | [inline] |
Initialize the previous task.
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.
[in] | current_task | Pointer to the task that is being chosen. |
bool pfunc::detail::group_predicate_pair< PolicyName, ValueType >::steal_pred | ( | value_type | current_task | ) | const [inline] |
Same as own_pred ()
[in] | current_task | Pointer to the task that is being chosen. |
value_type pfunc::detail::group_predicate_pair< PolicyName, ValueType >::previous_task |