Changeset View
Changeset View
Standalone View
Standalone View
src/test/validationinterface_tests.cpp
Show All 16 Lines | |||||
}; | }; | ||||
BOOST_AUTO_TEST_CASE(unregister_validation_interface_race) { | BOOST_AUTO_TEST_CASE(unregister_validation_interface_race) { | ||||
std::atomic<bool> generate{true}; | std::atomic<bool> generate{true}; | ||||
// Start thread to generate notifications | // Start thread to generate notifications | ||||
std::thread gen{[&] { | std::thread gen{[&] { | ||||
const CBlock block_dummy; | const CBlock block_dummy; | ||||
const BlockValidationState state_dummy; | BlockValidationState state_dummy; | ||||
while (generate) { | while (generate) { | ||||
GetMainSignals().BlockChecked(block_dummy, state_dummy); | GetMainSignals().BlockChecked(block_dummy, state_dummy); | ||||
} | } | ||||
}}; | }}; | ||||
// Start thread to consume notifications | // Start thread to consume notifications | ||||
std::thread sub{[&] { | std::thread sub{[&] { | ||||
// keep going for about 1 sec, which is 250k iterations | // keep going for about 1 sec, which is 250k iterations | ||||
▲ Show 20 Lines • Show All 59 Lines • Show Last 20 Lines |