8#include <boost/test/unit_test.hpp>
94 std::weak_ptr<int>
weak0;
97 auto state0{std::make_shared<int>(0)};
107 auto state1{std::make_shared<int>(0)};
121 auto state0{std::make_shared<int>(0)};
140 auto state0{std::make_shared<int>(0)};
143 std::promise<void> release;
146 release_future.wait();
162 decltype(
sig0)::result_type
ret;
198 std::atomic<uint32_t>
val_det{0};
203 for (
int i = 0; i < 1000; i++) {
215 std::vector<btcsignals::scoped_connection>
extra_conns;
311 std::binary_semaphore
done1{0};
312 std::binary_semaphore
done2{0};
322 std::thread
thr([&] {
BOOST_AUTO_TEST_CASE(callback_order)
A combiner, which checks if at least one callback returned true.
void disconnect()
If a callback is associated with this connection, prevent it from being called in the future.
connection connect(Callable &&func) EXCLUSIVE_LOCKS_REQUIRED(!m_mutex)
BOOST_FIXTURE_TEST_SUITE(cuckoocache_tests, BasicTestingSetup)
Test Suite for CuckooCache.
BOOST_AUTO_TEST_SUITE_END()
std::thread thread
Thread variable should be after other struct members so the thread does not start until the other mem...
#define BOOST_CHECK_EQUAL(v1, v2)
#define BOOST_CHECK(expr)
constexpr auto Ticks(Dur2 d)
Helper to count the seconds of a duration/time_point.