MCPcopy Create free account
hub / github.com/aui-framework/aui / TEST

Function TEST

aui.core/tests/ThreadingTest.cpp:32–43  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

30using namespace std::chrono_literals;
31
32TEST(Threading, Async) {
33 auto someInt = _new<std::atomic_int>(0);
34 AFutureSet<> f;
35 for (int i = 0; i < 100; ++i) {
36 f << async {
37 (*someInt) += 1;
38 };
39 }
40 f.waitForAll();
41
42 ASSERT_EQ(*someInt, 100);
43}
44
45TEST(Threading, SleepInterruption) {
46 bool called = false;

Callers

nothing calls this directly

Calls 15

isInterruptedMethod · 0.80
parallelMethod · 0.80
interruptMethod · 0.80
onSuccessMethod · 0.80
currentFunction · 0.50
waitForAllMethod · 0.45
waitMethod · 0.45
firstMethod · 0.45
startMethod · 0.45
push_backMethod · 0.45
beginMethod · 0.45
endMethod · 0.45

Tested by

no test coverage detected