Skip to content

Commit

Permalink
Attempt at fixing deadlock in test.
Browse files Browse the repository at this point in the history
  • Loading branch information
sean-parent committed Jan 25, 2025
1 parent d1b9a7a commit 0128f6c
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 1 deletion.
13 changes: 13 additions & 0 deletions CMakePresets.json
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,19 @@
"stlab.coverage": "OFF"
}
},
{
"name": "debug-cpp20-tsan-ubsan-portable",
"description": "Ninja Debug Build",
"hidden": false,
"generator": "Ninja",
"binaryDir": "${sourceDir}/build/ninja-cpp20-debug-thread-undefined",
"cacheVariables": {
"CMAKE_CXX_STANDARD": "20",
"CMAKE_BUILD_TYPE": "DEBUG",
"STLAB_TASK_SYSTEM": "portable",
"CMAKE_CXX_FLAGS": "-fsanitize=thread -fsanitize=undefined"
}
},
{
"name": "ninja-cpp20-debug-thread-undefined",
"description": "Ninja Debug Build",
Expand Down
2 changes: 1 addition & 1 deletion test/future_test_helper.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -202,7 +202,7 @@ class blocking_policy {
lock_t lock(*_context->_mutex);

while (!_context->_go || !_context->_may_proceed) {
_context->_thread_block.wait(lock);
invoke_waiting([&]{ _context->_thread_block.wait(lock); });
}
}
};
Expand Down

0 comments on commit 0128f6c

Please sign in to comment.