Type/to search
Built-in Functions
Global
Log
Market
Trade
Account
Futures
Exchange
IO
Network
Storage
Threads
exchange.Go
EventLoop
ctx.subscribe
ctx.poll
ctx.order
ctx.cancel
ctx.submit
Subscription
threading
threading.Thread
threading.getThread
threading.mainThread
threading.currentThread
threading.Lock
threading.Condition
threading.Event
threading.Dict
threading.Serve
threading.pending
Thread
ThreadLock
ThreadEvent
ThreadCondition
ThreadDict
Server
TA
Talib
OS
Structures
Built-in Variables and Constants
Conventions
Exchanges

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

TypeDescription

Thread object

Thread object of the current thread.

See Also

Remarks

Supports backtesting system and live trading environment.