[#BloombergLP-bslstl-SyncBufBaseUtil]
= xref:BloombergLP.adoc[BloombergLP]::xref:BloombergLP/bslstl.adoc[bslstl]::SyncBufBaseUtil
:relfileprefix: ../../
:mrdocs:

Internal utils&period;

== Synopsis

Declared in `&lt;bslstl&lowbar;syncbufbase&period;h&gt;`

[source,cpp,subs="verbatim,replacements,macros,-callouts"]
----
struct SyncBufBaseUtil;
----

== Static Member Functions

[cols="1,4"]
|===
| Name| Description
| xref:BloombergLP/bslstl/SyncBufBaseUtil/emitInternal.adoc[`emitInternal`] 
| Atomically transfer any characters buffered by the specified `syncBuf` object to the wrapped stream buffer, so that it appears in the output stream as a contiguous sequence of characters&period; The wrapped stream buffer is flushed if and only if a call was made to `sync` since the most recent call to `emit` or construction&period; Return `true` if `get&lowbar;wrapped() !&equals; nullptr`, and all of the characters in the associated output were successfully transferred, and the flush (if any) succeeded&semi; return `false` otherwise&period; The behavior is undefined unless `syncBuf` is not null&period;
| xref:BloombergLP/bslstl/SyncBufBaseUtil/setEmitOnSync.adoc[`setEmitOnSync`] 
| Set the &quot;emit&hyphen;on&hyphen;sync&quot; property of the synchronized buffer to the specified `value`&period; If &quot;emit&hyphen;on&hyphen;sync&quot; is `true`, the synchronized buffer will emit (see `emitInternal`) its buffered contents on a call to `sync` (or `pubsync`)&semi; otherwise the synchronized buffer will not be emitted on a `sync`&period; The behavior is undefined unless `syncBuf` is not null&period;
|===



[.small]#Created with https://www.mrdocs.com[MrDocs]#
