MCPcopy Create free account
hub / github.com/bshoshany/thread-pool / operator<

Method operator<

include/BS_thread_pool.hpp:426–429  ·  view source on GitHub ↗

* @brief Compare the priority of two tasks. * * @param lhs The first task. * @param rhs The second task. * @return `true` if the first task has a lower priority than the second task, `false` otherwise. */

Source from the content-addressed store, hash-verified

424 * @return `true` if the first task has a lower priority than the second task, `false` otherwise.
425 */
426 [[nodiscard]] friend bool operator<(const pr_task& lhs, const pr_task& rhs) noexcept
427 {
428 return lhs.priority < rhs.priority;
429 }
430
431 /**
432 * @brief The task. It is `mutable` so it can be moved out of the `const` reference returned by `std::priority_queue::top()`.

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected