| 3169 | SC_TEST_EXPECT(task.result()); |
| 3170 | SC_TEST_EXPECT(async.close()); |
| 3171 | #else |
| 3172 | SC_TEST_EXPECT(true); |
| 3173 | #endif |
| 3174 | } |
| 3175 | |
| 3176 | void loopWork() |
| 3177 | { |
| 3178 | ThreadPool threadPool; |
| 3179 | SC_TEST_EXPECT(threadPool.create(2)); |
| 3180 | |
| 3181 | AsyncEventLoop async; |
| 3182 | SC_TEST_EXPECT(async.create()); |
| 3183 | SC_AWAIT_TEST_EVENT_LOOP(await, async); |
| 3184 | |
| 3185 | Atomic<int> workCount = 0; |
| 3186 | AwaitTask task = loopWorkOnce(await, threadPool, workCount); |
| 3187 | SC_TEST_EXPECT(await.spawn(task)); |
| 3188 | SC_TEST_EXPECT(await.run()); |
| 3189 | |