mirror of
https://github.com/mhx/dwarfs.git
synced 2025-09-14 06:48:39 -04:00
Remove sync() call in progress class
This commit is contained in:
parent
b43500219a
commit
cacf8d212b
@ -57,12 +57,6 @@ class progress {
|
|||||||
unsigned interval_ms);
|
unsigned interval_ms);
|
||||||
~progress() noexcept;
|
~progress() noexcept;
|
||||||
|
|
||||||
template <typename T>
|
|
||||||
void sync(T&& func) {
|
|
||||||
std::unique_lock lock(mx_);
|
|
||||||
func();
|
|
||||||
}
|
|
||||||
|
|
||||||
std::shared_ptr<context> create_context(std::string const& name) const;
|
std::shared_ptr<context> create_context(std::string const& name) const;
|
||||||
std::vector<std::shared_ptr<context const>> get_active_contexts() const;
|
std::vector<std::shared_ptr<context const>> get_active_contexts() const;
|
||||||
|
|
||||||
|
@ -749,7 +749,7 @@ void scanner_<LoggerPolicy>::scan(
|
|||||||
prog.set_status_function([](progress const&, size_t) {
|
prog.set_status_function([](progress const&, size_t) {
|
||||||
return "waiting for block compression to finish";
|
return "waiting for block compression to finish";
|
||||||
});
|
});
|
||||||
prog.sync([&] { prog.current.store(nullptr); });
|
prog.current.store(nullptr);
|
||||||
|
|
||||||
// this is actually needed
|
// this is actually needed
|
||||||
root->set_name(std::string());
|
root->set_name(std::string());
|
||||||
|
Loading…
x
Reference in New Issue
Block a user