MCPcopy Create free account
hub / github.com/DmitriBogdanov/UTL / execute

Method execute

benchmarks/module_parallel/thread_pool_comparison.cpp:58–65  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

56struct LargeTask {
57 template <class Pool>
58 void execute(std::atomic<std::size_t>& tasks_done, Pool&) {
59 constexpr unsigned int duration_min = 1000;
60 constexpr unsigned int duration_max = 3000;
61
62 sleep::spinlock(std::chrono::microseconds(random::uniform_uint(duration_min, duration_max)));
63
64 ++tasks_done;
65 }
66};
67
68struct ShallowRecursiveTask {

Callers

nothing calls this directly

Calls 2

spinlockFunction · 0.50
uniform_uintFunction · 0.50

Tested by

no test coverage detected