Availability:built-in
[deprecated]thread_exit(+Term)Terminates the thread immediately, leaving exited(Term)
as
result state for thread_join/2.
If the thread has the attribute
detached(true)
it terminates, but its exit status cannot be
retrieved using thread_join/2,
making the value of Term irrelevant. The Prolog stacks and C
thread are reclaimed.
The current implementation does not guarantee proper releasing of all
mutexes and proper cleanup in setup_call_cleanup/3,
etc. Please use the exception mechanism (throw/1)
to abort execution using non-standard control. The predicate thread_exit/1
has been dropped from the Windows versions due to issues with the
implementation in pthread-win32
.