template<typename Key = int64_t>
gtopt::BasicTaskRequirements struct

Task requirements with a generic priority key.

Template parameters
Key The type of the secondary sort key. Must be default- constructible and equality-comparable. The default is int64_t for backward compatibility.

When two tasks share the same TaskPriority, the pool dequeues them according to KeyCompare(key1, key2) (see BasicWorkPool): by default the task with the smaller key runs first.

Public types

using key_type = Key

Public variables

std::chrono::milliseconds estimated_duration
int estimated_threads
std::optional<std::string> name
TaskPriority priority
Key priority_key

Variable documentation

template<typename Key>
Key gtopt::BasicTaskRequirements<Key>::priority_key

Secondary sort key. With the default std::less<Key> comparator on the pool, the task with the smaller key is dequeued first within the same TaskPriority tier.