std::basic_syncbuf::emit(3)
π NAME π
std::basic_syncbuf::emit β okay so this is literally the page for std::basic_syncbuf::emit, bestie. And up top we're in the C++ Standard Libary manual (that spelling is straight from the header, iykyk ππ
).
β¨ Synopsis β¨
bool emit();
Atomically transmits all pending output to the wrapped stream. Periodt.
All emit() calls transferring characters to the same wrapped stream buffer object appear to execute in a total order, where each emit() call synchronizes-with subsequent emit() calls in that total order, even if these calls are made through difference instances (yes, literally the word on the page, bestie π) of std::basic_syncbuf/std::basic_osyncstream. In practice, this means that emit() takes a lock uniquely associated with the wrapped stream object: for example, it could be held in a static hash map where the address of the wrapped stream is used as the key. No cap, that's the synchronization vibe.
If a call had been made to sync since the last call to emit(), then it also flushes the wrapped stream by calling pubsync() on it.
π Parameters π
(none) β literally none, not a single parameter. Slay.
πΈ Return value πΈ
true if all of the following is true:
- there is a wrapped stream (the wrapped streambuf pointer is not null)
- all characters from the temporary storage were successfully sent into the wrapped stream
- the call to
pubsync(), if requested, also completed successfully.
Returns false otherwise.
π¦ Notes π¦
Normally called by the destructor or move assignment of the owning std::basic_osyncstream, or by std::basic_osyncstream::emit.
π Example π
This section is incomplete.
Reason: no example.
π See also π
destructorβ destroys thebasic_osyncstreamand emits its internal buffer (public member function ofstd::basic_osyncstream<CharT,Traits,Allocator>)emitβ callsemit()on the underlyingbasic_syncbufto transmit its internal data to the final destination (public member function ofstd::basic_osyncstream<CharT,Traits,Allocator>)constructorβ constructs abasic_syncbufobject (public member function)
π Category π
- Todo no example
okay that's the whole page, bestie. source/version: http://cppreference.com β date: 2024.06.10 β¨π catch u later, and remember: std::basic_syncbuf::emit(3) says bye ππ
π¦ where this page comes from
- nixpkgs unstable: stdman 2024.07.05
- opensuse-leap 16.0: stdman 2024.07.05-bp160.1.9 Β· MIT
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash-1017 on : a language model's rewrite of the original, under its terms