Skip to content
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 3 additions & 1 deletion .github/workflows/cmake.yml
Original file line number Diff line number Diff line change
Expand Up @@ -191,4 +191,6 @@ jobs:
shell: bash
# Execute tests defined by the CMake configuration.
# See https://cmake.org/cmake/help/latest/manual/ctest.1.html for more detail
run: ctest --output-on-failure -C $BUILD_TYPE
run: |
ctest --output-on-failure -C $BUILD_TYPE && \
ctest -V -R '^async auto reset event tests-multi-threaded$'
2 changes: 1 addition & 1 deletion test/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,7 @@ if(WIN32)
)
else()
# let more time for some tests
set(async_auto_reset_event_tests_TIMEOUT 60)
set(async_auto_reset_event_tests_TIMEOUT 200)
endif()

foreach(test ${tests})
Expand Down
12 changes: 12 additions & 0 deletions test/async_auto_reset_event_tests.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -102,6 +102,18 @@ TEST_CASE("multi-threaded")
co_await tp.schedule();
co_await event;
++value;

thread_local volatile bool nested = false;

if (nested)
{
co_await tp.schedule();
assert(!nested);
}

nested = true;
cppcoro::scoped_lambda cleanup = [] { nested = false; };

event.set();
};

Expand Down