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

Set whether `syncBuf` emits its buffer on a call to `sync`&period;

== Synopsis

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

[source,cpp,subs="verbatim,replacements,macros,-callouts"]
----
static
void
setEmitOnSync(
    xref:BloombergLP/bslstl/SyncBufBase.adoc[SyncBufBase]* syncBuf,
    bool value);
----

== Description

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;

== Parameters

[cols="1,4"]
|===
| Name| Description
| *syncBuf*
| synchronized buffer whose emit&hyphen;on&hyphen;sync flag is set
| *value*
| `true` to emit on sync&semi; `false` otherwise
|===


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