MCPcopy Create free account
hub / github.com/acl-dev/acl / main

Function main

lib_acl_cpp/samples/tbox2/tbox.cpp:59–83  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

57};
58
59int main(void)
60{
61 acl::thread_pool threads;
62 threads.set_limit(500);
63 threads.start();
64
65 int nconsumers = 10, max_loop = 1000000;
66 std::vector<acl::thread*> consumers;
67 for (int i = 0; i < nconsumers; i++) {
68 acl::thread* thr = new consumer(threads, max_loop);
69 consumers.push_back(thr);
70 thr->start();
71 }
72
73 for (std::vector<acl::thread*>::iterator it = consumers.begin();
74 it != consumers.end(); ++it) {
75 (*it)->wait();
76 delete *it;
77 }
78
79 threads.stop();
80
81 printf("All over: count=%d\r\n", nconsumers * max_loop);
82 return 0;
83}

Callers

nothing calls this directly

Calls 6

beginMethod · 0.80
startMethod · 0.45
push_backMethod · 0.45
endMethod · 0.45
waitMethod · 0.45
stopMethod · 0.45

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…