| 7 | #include <vector> |
| 8 | |
| 9 | int main() { |
| 10 | ::babylon::CountDownLatch<::babylon::ButexInterface> latch(10); |
| 11 | auto future = latch.get_future(); |
| 12 | for (size_t i = 0; i < 10; ++i) { |
| 13 | ::babylon::bthread_async([&, i]() { |
| 14 | BABYLON_LOG(INFO) << "finish " << i; |
| 15 | latch.count_down(); |
| 16 | }); |
| 17 | } |
| 18 | future.get(); |
| 19 | BABYLON_LOG(INFO) << "finish all"; |
| 20 | return 0; |
| 21 | } |
no test coverage detected