Built-in Functions
Structures
Built-in Variables and Constants
Conventions
Exchanges
threading.currentThread
Gets the thread object of the current thread.
currentThread()Examples
Get the Thread object of the current thread and output the threadId of the current thread.
javascript
function test() {
Log("Current thread ID:", threading.currentThread().id())
}
function main() {
var t1 = threading.Thread(test)
t1.join()
}Returns
| Type | Description |
| Thread object of the current thread. |
See Also
Remarks
Supports backtesting system and live trading environment.