Task ID generator (atomic for thread safety)
| 20 | |
| 21 | // Task ID generator (atomic for thread safety) |
| 22 | int next_task_id() { |
| 23 | static fl::atomic<int> id(0); // okay static in header |
| 24 | return id.fetch_add(1) + 1; |
| 25 | } |
| 26 | } // namespace |
| 27 | |
| 28 | } // namespace task |
no test coverage detected