added connection pool and tests

This commit is contained in:
Sascha Kühl
2025-02-05 15:47:51 +01:00
parent 45a7199ccf
commit bc3ffbda10
20 changed files with 495 additions and 53 deletions
+28
View File
@@ -0,0 +1,28 @@
#ifndef QUERY_AUTO_RESET_EVENT_HPP
#define QUERY_AUTO_RESET_EVENT_HPP
#include <atomic>
#include <condition_variable>
#include <mutex>
namespace matador::test::utils {
class auto_reset_event
{
public:
auto_reset_event();
auto_reset_event(const auto_reset_event& other) = delete;
void wait_one();
void set();
void reset();
private:
std::condition_variable underlying;
std::mutex sync;
std::atomic<bool> state;
};
}
#endif //QUERY_AUTO_RESET_EVENT_HPP