add: rapid output console commands are now put on queue and sent with intervals. fixes #176, and overflows causes by yb cvars and yb g clean all commands.

This commit is contained in:
ds 2020-10-13 15:43:25 +03:00
commit fba3837523
5 changed files with 76 additions and 16 deletions

View file

@ -132,17 +132,16 @@ public:
return index_.first == index_.second;
}
template <typename U> void emplaceLast (U &&object) {
template <typename ...Args> void emplaceLast (Args &&...args) {
auto rear = pickRearIndex ();
alloc.construct (&contents_[index_.second], cr::forward <U> (object));
alloc.construct (&contents_[index_.second], cr::forward <Args> (args)...);
index_.second = rear;
}
template <typename U> void emplaceFront (U &&object) {
template <typename ...Args> void emplaceFront (Args &&...args) {
index_.first = pickFrontIndex ();
alloc.construct (&contents_[index_.first], cr::forward <U> (object));
alloc.construct (&contents_[index_.first], cr::forward <Args> (args)...);
}
void discardFront () {