| 78 | std::array<Guide, max_threads> guides; |
| 79 | |
| 80 | void workerThread(unsigned id) { |
| 81 | guides[id].initial_delay(); // emulate some work before sema acquisition |
| 82 | sem.acquire(); // wait until a free sema slot is available |
| 83 | guides[id].occupy_sema(); // emulate some work while sema is acquired |
| 84 | sem.release(); |
| 85 | guides[id].visualize(id); |
| 86 | } |
| 87 | |
| 88 | int main() { |
| 89 | std::vector<std::thread> threads; |
nothing calls this directly
no test coverage detected