Lines Matching refs:loop
30 IOEventLoop loop; in TEST() local
33 ASSERT_NE(nullptr, loop.AddReadEvent(fd[0], [&]() { in TEST()
39 return loop.ExitLoop(); in TEST()
57 ASSERT_TRUE(loop.RunLoop()); in TEST()
69 IOEventLoop loop; in TEST() local
71 ASSERT_NE(nullptr, loop.AddWriteEvent(fd[1], [&]() { in TEST()
78 loop.ExitLoop(); in TEST()
94 ASSERT_TRUE(loop.RunLoop()); in TEST()
103 IOEventLoop loop; in TEST() local
105 ASSERT_TRUE(loop.AddSignalEvent(SIGINT, [&]() { in TEST()
107 loop.ExitLoop(); in TEST()
118 ASSERT_TRUE(loop.RunLoop()); in TEST()
129 IOEventLoop loop; in TestPeriodicEvents() local
131 ASSERT_TRUE(loop.UsePreciseTimer()); in TestPeriodicEvents()
133 ASSERT_TRUE(loop.AddPeriodicEvent(tv, [&]() { in TestPeriodicEvents()
135 loop.ExitLoop(); in TestPeriodicEvents()
140 ASSERT_TRUE(loop.RunLoop()); in TestPeriodicEvents()
162 IOEventLoop loop; in TEST() local
164 IOEventRef ref = loop.AddReadEvent(fd[0], [&]() { in TEST()
177 ASSERT_TRUE(loop.RunLoop()); in TEST()
187 IOEventLoop loop; in TEST() local
189 IOEventRef ref = loop.AddWriteEvent(fd[1], [&]() { in TEST()
199 ASSERT_TRUE(loop.AddPeriodicEvent(tv, [&]() { in TEST()
210 return loop.ExitLoop(); in TEST()
214 ASSERT_TRUE(loop.RunLoop()); in TEST()
225 IOEventLoop loop; in TEST() local
226 IOEventRef wait_ref = loop.AddPeriodicEvent(tv, [&]() { return loop.ExitLoop(); }); in TEST()
228 ASSERT_TRUE(loop.DisableEvent(wait_ref)); in TEST()
233 IOEventRef ref = loop.AddPeriodicEvent(tv, [&]() { in TEST()
234 if (!loop.DisableEvent(ref)) { in TEST()
239 return loop.EnableEvent(ref); in TEST()
241 return loop.EnableEvent(wait_ref); in TEST()
243 ASSERT_TRUE(loop.RunLoop()); in TEST()
248 IOEventLoop loop; in TEST() local
249 ASSERT_TRUE(loop.ExitLoop()); in TEST()