[#BloombergLP-bslmt-Once-callOnce-02]
= xref:BloombergLP.adoc[BloombergLP]::xref:BloombergLP/bslmt.adoc[bslmt]::xref:BloombergLP/bslmt/Once.adoc[Once]::callOnce
:relfileprefix: ../../../
:mrdocs:

Call `function` at most once across all threads for this object&period;

== Synopses

Declared in `&lt;bslmt&lowbar;once&period;h&gt;`

Call `function` at most once across all threads for this object&period;


[source,cpp,subs="verbatim,replacements,macros,-callouts"]
----
template&lt;class FUNC&gt;
void
xref:BloombergLP/bslmt/Once/callOnce-0f.adoc[callOnce](FUNC& function);
----

[.small]#xref:BloombergLP/bslmt/Once/callOnce-0f.adoc[_» more&period;&period;&period;_]#

Call `function` at most once across all threads for this object&period;


[source,cpp,subs="verbatim,replacements,macros,-callouts"]
----
template&lt;class FUNC&gt;
void
xref:BloombergLP/bslmt/Once/callOnce-03.adoc[callOnce](FUNC const& function);
----

[.small]#xref:BloombergLP/bslmt/Once/callOnce-03.adoc[_» more&period;&period;&period;_]#

== Parameters

[cols="1,4"]
|===
| Name| Description
| *function*
| no&hyphen;argument function or functor to invoke at most once
|===


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