Go to the documentation of this file.
50 template <
typename... Args>
61 std::list<T>&
items();
64 [[nodiscard]] int64_t
size()
const;
Special queue that allows the extraction of item using custom policies.
Definition: queue.hpp:23
std::list< T > & items()
Definition: queue.inl:27
Used to handle errors without using exceptions.
Definition: result.hpp:18
void emplace(Args &&... args)
Definition: queue.inl:18
Policies are used to prioritize execution of tasks.
Error
All possible error that can occur.
Definition: queue.hpp:29
std::function< bool(fur::PieceTask &)> MutateFn
Definition: queue.hpp:41
Result extract(const IPolicy< T > &policy)
Definition: queue.inl:32
@ Empty
There are no more elements.
@ PolicyFailure
Policy returned no element.
Definition: policy.hpp:16
void mutate(MutateFn mutation)
Mutate the internal list of items.
Definition: queue.inl:45
Definition: policy.hpp:19
int64_t size() const
Definition: queue.inl:57
void insert(T &&item)
Definition: queue.inl:8