refactor
All checks were successful
BlockStorage/repertory/pipeline/head This commit looks good

This commit is contained in:
Scott E. Graves 2024-12-22 10:49:02 -06:00
parent 8bb179c4dd
commit 57d583d6b5
5 changed files with 8 additions and 5 deletions

View File

@ -69,6 +69,7 @@ public:
get_read_state(std::size_t /* chunk */) const -> bool override {
return false;
}
[[nodiscard]] auto get_total_chunks() const -> std::uint64_t {
return total_chunks_;
}

View File

@ -95,7 +95,7 @@ public:
[[nodiscard]] virtual auto can_close() const -> bool = 0;
virtual void close() = 0;
virtual auto close() -> bool = 0;
[[nodiscard]] virtual auto
get_handles() const -> std::vector<std::uint64_t> = 0;

View File

@ -90,7 +90,7 @@ protected:
}
public:
void close() override;
auto close() -> bool override;
[[nodiscard]] auto get_read_state() const -> boost::dynamic_bitset<> override;

View File

@ -142,7 +142,7 @@ public:
[[nodiscard]] auto can_close() const -> bool override;
void close() override;
auto close() -> bool override;
[[nodiscard]] auto get_api_error() const -> api_error;

View File

@ -297,12 +297,12 @@ void open_file_base::set_api_path(const std::string &api_path) {
fsi_.api_parent = utils::path::get_parent_api_path(api_path);
}
void open_file_base::close() {
auto open_file_base::close() -> bool {
unique_mutex_lock io_lock(io_thread_mtx_);
if (io_stop_requested_ || not io_thread_) {
io_thread_notify_.notify_all();
io_lock.unlock();
return;
return false;
}
io_stop_requested_ = true;
@ -311,5 +311,7 @@ void open_file_base::close() {
io_thread_->join();
io_thread_.reset();
return true;
}
} // namespace repertory