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

Class loop_task

include/BS_thread_pool.hpp:690–701  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

688 */
689template <typename T, typename F>
690struct loop_task
691{
692 void operator()()
693 {
694 for (T i = start; i < end; ++i)
695 (*loop_ptr)(i);
696 }
697
698 std::shared_ptr<std::decay_t<F>> loop_ptr;
699 T start;
700 T end;
701}; // struct loop_task
702
703/**
704 * @brief A function object class used by `detach_sequence()` and `submit_sequence()` to execute a sequence function over a specified index.

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected