Thread.id
Returns the threadId of the current multi-threaded object instance.
id()Examples
Create a concurrently running thread and output the threadId of that concurrent thread in the main thread.
javascript
function main() {
var t1 = threading.Thread(function() {
threading.currentThread().setData("data", 100)
})
Log(`t1.id():`, t1.id())
t1.join()
}Returns
| Type | Description |
number | Thread ID ( |
See Also