mirror of
https://github.com/gabime/spdlog.git
synced 2024-11-15 16:35:45 +08:00
astyle
This commit is contained in:
parent
6cda714e4a
commit
7f0434528b
@ -11,7 +11,7 @@ int main(int, char* argv[])
|
|||||||
FLAGS_log_dir = "logs";
|
FLAGS_log_dir = "logs";
|
||||||
google::InitGoogleLogging(argv[0]);
|
google::InitGoogleLogging(argv[0]);
|
||||||
for(int i = 0 ; i < howmany; ++i)
|
for(int i = 0 ; i < howmany; ++i)
|
||||||
LOG(INFO) << "glog message # " << i << ": This is some text for your pleasure";
|
LOG(INFO) << "glog message # " << i << ": This is some text for your pleasure";
|
||||||
|
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
@ -37,7 +37,8 @@
|
|||||||
namespace spdlog
|
namespace spdlog
|
||||||
{
|
{
|
||||||
|
|
||||||
namespace sinks {
|
namespace sinks
|
||||||
|
{
|
||||||
class async_sink;
|
class async_sink;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -57,7 +58,7 @@ protected:
|
|||||||
void _stop() override;
|
void _stop() override;
|
||||||
|
|
||||||
private:
|
private:
|
||||||
log_clock::duration _shutdown_duration;
|
log_clock::duration _shutdown_duration;
|
||||||
std::unique_ptr<sinks::async_sink> _as;
|
std::unique_ptr<sinks::async_sink> _as;
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
@ -73,7 +73,8 @@ public:
|
|||||||
std::unique_lock<std::mutex> ul(_mutex);
|
std::unique_lock<std::mutex> ul(_mutex);
|
||||||
if (is_full())
|
if (is_full())
|
||||||
{
|
{
|
||||||
if (!_item_popped_cond.wait_until(ul, clock::now() + timeout, [this]() {
|
if (!_item_popped_cond.wait_until(ul, clock::now() + timeout, [this]()
|
||||||
|
{
|
||||||
return !this->is_full();
|
return !this->is_full();
|
||||||
}))
|
}))
|
||||||
return false;
|
return false;
|
||||||
|
Loading…
Reference in New Issue
Block a user