detached(Bool)
option at
thread_create/3)
at runtime. Id is the identifier of the thread placed in
detached state. This may be the result of thread_self/1.
One of the possible applications is to simplify debugging. Threads that are created as detached leave no traces if they crash. For non-detached threads the status can be inspected using thread_property/2. Threads nobody is waiting for may be created normally and detach themselves just before completion. This way they leave no traces on normal completion and their reason for failure can be inspected.