Normal multithreaded applications should not need the predicates from this section because almost any usage of these predicates is unsafe. For example checking the existence of a thread before signalling it is of no use as it may vanish between the two calls. Catching exceptions using catch/3 is the only safe way to deal with thread-existence errors.
These predicates are provided for diagnosis and monitoring tasks. See also section 9.5, describing more high-level primitives.
See also thread_statistics/3 to obtain resource usage information and message_queue_property/2 to get the number of queued messages for a thread.
cputime
,
inferences
and epoch
yield different values
for each thread.141There is no
portable interface to obtain thread-specific CPU time and some operating
systems provide no access to this information at all. On such systems
the total process CPU is returned. Thread CPU time is supported on
MS-Windows, Linux and MacOSX.