| 150 | } |
| 151 | |
| 152 | void log(FunctionCall && call) |
| 153 | { |
| 154 | auto available = false; |
| 155 | auto next = g_buffer.nextHead(available); |
| 156 | |
| 157 | while (!available) |
| 158 | { |
| 159 | std_boost::this_thread::sleep_for(std_boost::chrono::milliseconds(1)); |
| 160 | next = g_buffer.nextHead(available); |
| 161 | } |
| 162 | |
| 163 | assert(!g_buffer.isFull()); |
| 164 | |
| 165 | delete next; |
| 166 | g_buffer.push(new FunctionCall(std::move(call))); |
| 167 | } |
| 168 | |
| 169 | void startWriter(const std::string & filepath) |
| 170 | { |