diff --git a/_codeql_detected_source_root b/_codeql_detected_source_root new file mode 120000 index 00000000..945c9b46 --- /dev/null +++ b/_codeql_detected_source_root @@ -0,0 +1 @@ +. \ No newline at end of file diff --git a/src/core/config/config.cpp b/src/core/config/config.cpp index 79b48b2e..9686ec86 100644 --- a/src/core/config/config.cpp +++ b/src/core/config/config.cpp @@ -2,6 +2,7 @@ #include "duckdb/common/file_system.hpp" #include "flock/secret_manager/secret_manager.hpp" #include +#include #include namespace flock { @@ -144,11 +145,7 @@ bool Config::StorageAttachmentGuard::TryDetach() { } void Config::StorageAttachmentGuard::Wait(int milliseconds) { - auto start = std::chrono::steady_clock::now(); - auto duration = std::chrono::milliseconds(milliseconds); - while (std::chrono::steady_clock::now() - start < duration) { - // Busy-wait until the specified duration has elapsed - } + std::this_thread::sleep_for(std::chrono::milliseconds(milliseconds)); } Config::StorageAttachmentGuard::StorageAttachmentGuard(duckdb::Connection& con, bool read_only) @@ -201,11 +198,7 @@ bool Config::StorageAttachmentGuard::TryDetach() { } void Config::StorageAttachmentGuard::Wait(int milliseconds) { - auto start = std::chrono::steady_clock::now(); - auto duration = std::chrono::milliseconds(milliseconds); - while (std::chrono::steady_clock::now() - start < duration) { - // Busy-wait until the specified duration has elapsed - } + std::this_thread::sleep_for(std::chrono::milliseconds(milliseconds)); } Config::StorageAttachmentGuard::StorageAttachmentGuard(duckdb::Connection& con, bool read_only)