[#BloombergLP-bslmt-ThreadAttributes-setDetachedState]
= xref:BloombergLP.adoc[BloombergLP]::xref:BloombergLP/bslmt.adoc[bslmt]::xref:BloombergLP/bslmt/ThreadAttributes.adoc[ThreadAttributes]::setDetachedState
:relfileprefix: ../../../
:mrdocs:

Set the `detachedState` attribute of this object to the specified `value`&period;

== Synopsis

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

[source,cpp,subs="verbatim,replacements,macros,-callouts"]
----
xref:BloombergLP/bslmt/ThreadAttributes.adoc[ThreadAttributes]&
setDetachedState(xref:BloombergLP/bslmt/ThreadAttributes/DetachedState-09.adoc[DetachedState] value);
----

== Description

Return a non&hyphen;`const` reference to this object (see also &lcub;Fluent Interface&rcub;)&period; A value of `e&lowbar;CREATE&lowbar;JOINABLE` (the default) indicates that a thread must be joined to clean up its resources after it terminates&semi; a value of `e&lowbar;CREATE&lowbar;DETACHED` (the only other legal value) indicates that the resources will be cleaned up automatically upon thread termination, and that the thread must not be joined&period;

== Return Value

a non&hyphen;`const` reference to this object

== Parameters

[cols="1,4"]
|===
| Name| Description
| *value*
| detached state for created threads
|===


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