[ library(threads) | Reference Manual | Alphabetic Index ]

thread_join(+Thread, -Status)

Wait for termination of Thread
Thread
A DTR-thread alias or handle
Status
Output: result status

Description

Block until Thread terminates, and unify Status with its result status. For the possible status values, see get_engine_property/3, with the difference that here exited(Term) may contain an arbitrary term.

After this call, the DTR-thread is destroyed and its handles and alias are invalid.

Modes and Determinism

See Also

engine_join / 3, get_engine_property / 3, thread_create / 3