using mpmc bounded q for async and many async optimizations

This commit is contained in:
gabime
2014-12-05 20:25:04 +02:00
parent 754cac85ac
commit 52d02af950
7 changed files with 261 additions and 61 deletions

View File

@@ -37,7 +37,7 @@ struct log_msg
log_msg(level::level_enum l):
logger_name(),
level(l),
time(),
time(),
raw(),
formatted() {}
@@ -57,7 +57,7 @@ struct log_msg
log_msg(log_msg&& other) :
logger_name(std::move(other.logger_name)),
level(other.level),
time(std::move(other.time)),
time(std::move(other.time)),
raw(std::move(other.raw)),
formatted(std::move(other.formatted))
{
@@ -71,15 +71,13 @@ struct log_msg
logger_name = std::move(other.logger_name);
level = other.level;
time = std::move(other.time);
time = std::move(other.time);
raw = std::move(other.raw);
formatted = std::move(other.formatted);
other.clear();
return *this;
}
void clear()
{
level = level::OFF;
@@ -90,7 +88,6 @@ struct log_msg
std::string logger_name;
level::level_enum level;
log_clock::time_point time;
//std::tm tm_time;
fmt::MemoryWriter raw;
fmt::MemoryWriter formatted;
};