mirror of https://github.com/polybar/polybar.git
fix: Revert nested locking in module destruct
This commit is contained in:
parent
2b39fcd7dd
commit
1e5fc993a4
|
@ -129,20 +129,16 @@ namespace modules
|
||||||
if (this->enabled())
|
if (this->enabled())
|
||||||
this->stop();
|
this->stop();
|
||||||
|
|
||||||
std::lock_guard<concurrency::SpinLock> lck(this->broadcast_lock);
|
std::lock_guard<concurrency::SpinLock> lck(this->update_lock);
|
||||||
{
|
{
|
||||||
std::lock_guard<concurrency::SpinLock> lck(this->update_lock);
|
for (auto &&t : this->threads) {
|
||||||
{
|
if (t.joinable())
|
||||||
std::lock_guard<concurrency::SpinLock> lck(this->output_lock);
|
t.join();
|
||||||
{
|
else
|
||||||
for (auto &&t : this->threads) {
|
log_warning("["+ ConstCastModule(ModuleImpl).name() +"] Runner thread not joinable");
|
||||||
if (t.joinable())
|
|
||||||
t.join();
|
|
||||||
else
|
|
||||||
log_warning("["+ ConstCastModule(ModuleImpl).name() +"] Runner thread not joinable");
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
this->threads.clear();
|
||||||
}
|
}
|
||||||
|
|
||||||
log_trace(name());
|
log_trace(name());
|
||||||
|
|
Loading…
Reference in New Issue