[#BloombergLP-ball-AsyncFileObserver-startPublicationThread]
= xref:BloombergLP.adoc[BloombergLP]::xref:BloombergLP/ball.adoc[ball]::xref:BloombergLP/ball/AsyncFileObserver.adoc[AsyncFileObserver]::startPublicationThread
:relfileprefix: ../../../
:mrdocs:

Start a thread that asynchronously publishes queued log records&period;

== Synopsis

Declared in `&lt;ball&lowbar;asyncfileobserver&period;h&gt;`

[source,cpp,subs="verbatim,replacements,macros,-callouts"]
----
int
startPublicationThread();
----

== Description

Start a publication thread to asynchronously publish log records from the record queue&period; If a publication thread is already active, this operation has no effect&period; Return 0 on success, and a non&hyphen;zero value if there is an error creating the publication thread&period; Note that log records received by the `publish` method may have accumulated on the queue before the publication thread is started&period;

== Return Value

0 on success, and a non&hyphen;zero value otherwise


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