输入/搜索内容
内置函数
Global
Log
Market
Trade
Account
Futures
Threads
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
结构体
内置变量

获取当前线程的线程对象。

currentThread()

示例

获取当前线程的Thread对象,输出当前线程的threadId。

javascript
function test() { Log("当前线程的Id:", threading.currentThread().id()) } function main() { var t1 = threading.Thread(test) t1.join() }

返回值

类型描述

Thread对象

当前线程的线程对象。

参考

备注

支持回测系统、实盘环境。