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

Class sequence_task

include/BS_thread_pool.hpp:711–720  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

709 */
710template <typename T, typename F, typename R>
711struct sequence_task
712{
713 R operator()()
714 {
715 return (*sequence_ptr)(i);
716 }
717
718 std::shared_ptr<std::decay_t<F>> sequence_ptr;
719 T i;
720}; // struct sequence_task
721
722/**
723 * @brief A class that takes a function with a return value (but no arguments), and constructs a task with no return value along with a future used to retrieve the function's return value once the task is executed. Used by `submit_task()` and `submit_bulk()`.

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected