Removed redundant 'Bloom' namespace from entire codebase

This commit is contained in:
Nav
2023-08-13 15:47:51 +01:00
parent 0935ba65cf
commit 5896306f1a
555 changed files with 6254 additions and 6510 deletions

View File

@@ -1,26 +1,23 @@
#include "ConditionVariableNotifier.hpp"
namespace Bloom
{
void ConditionVariableNotifier::notify() {
const auto lock = std::unique_lock(this->mutex);
this->notified = true;
this->conditionalVariable.notify_all();
}
void ConditionVariableNotifier::waitForNotification(std::optional<std::chrono::milliseconds> timeout) {
const auto predicate = [this] {
return this->notified;
};
auto lock = std::unique_lock(this->mutex);
if (timeout.has_value()) {
this->conditionalVariable.wait_for(lock, timeout.value(), predicate);
} else {
this->conditionalVariable.wait(lock, predicate);
}
this->notified = false;
}
void ConditionVariableNotifier::notify() {
const auto lock = std::unique_lock(this->mutex);
this->notified = true;
this->conditionalVariable.notify_all();
}
void ConditionVariableNotifier::waitForNotification(std::optional<std::chrono::milliseconds> timeout) {
const auto predicate = [this] {
return this->notified;
};
auto lock = std::unique_lock(this->mutex);
if (timeout.has_value()) {
this->conditionalVariable.wait_for(lock, timeout.value(), predicate);
} else {
this->conditionalVariable.wait(lock, predicate);
}
this->notified = false;
}