Function ThreadInfo() Foundation
Retrieves information about existing threads.
ThreadInfo( <nWhichInfo>, [<nThreadID>] ) --> aInfo
|A||THREADINFO_TID||The numeric thread ID|
|B||THREADINFO_SYSTHND||The numeric handle used by the operating system for this thread.|
|C||THREADINFO_FUNCINFO||The function name and line number currently being executed.|
|D||THREADINFO_TOBJ||The thread object representing the thread|
The function returns a two-dimensional array where each thread has one sub-array containing one or more elements controlled by <nWhichInfo>. If <nWhichInfo> is a combination of constants, the elements of the sub-array (the array columns) appear in the sequence order of each constant (first column in the table).
The function ThreadInfo() returns various information about existing threads of the current process. The constant THREADINFO_TID retrieves the Xbase++ thread ID which is also returned by the ThreadId() function for the current thread. THREADINFO_SYSTHND retrieves the thread IDs used by the operating system. They are provided for calling API functions or for passing system IDs to third-party tools which require this low-lovel information. THREADINFO_FUNCINFO results in two elements being added to the sub-arrays. They contain program line and name of the function or method currently being executed in the corresponding thread. Both elements contain NIL if the thread is idle and does not process program code. THREADINFO_TOBJ finally retrieves the Thread object representing a thread.
If you see anything in the documentation that is not correct, does not match your experience with the particular feature or requires further clarification, please use this form to report a documentation issue.