* Flushes the underlying writer if it supports that operation and is safe to do so. * * Safe flushing means that it only performs the flush operation if the @c JsonEncoder has not acquired * any object lock so far. This is to ensure that the stream can safely perform asynchronous operations * without risking undefined behaviour due to coroutines being suspended while the stream is being flushe
| 315 | * @param yc The yield context to use for asynchronous operations. |
| 316 | */ |
| 317 | void JsonEncoder::Flusher::FlushIfSafe(boost::asio::yield_context* yc) const |
| 318 | { |
| 319 | if (yc && m_AsyncWriter) { |
| 320 | m_AsyncWriter->MayFlush(*yc); |
| 321 | } |
| 322 | } |
| 323 | |
| 324 | class JsonSax : public nlohmann::json_sax<nlohmann::json> |
| 325 | { |
no test coverage detected