currentThread()
函数用于获取当前线程的线程对象。
currentThread()
函数返回当前线程的线程对象。
Thread
对象
currentThread()
function test() {
Log("当前线程的Id:", threading.currentThread().id())
}
function main() {
var t1 = threading.Thread(test)
t1.join()
}
获取当前线程的Thread
对象,输出当前线程的threadId
。
支持回测系统、实盘环境。
{@fun/Threads/threading/Thread Thread}, {@fun/Threads/threading/mainThread mainThread}, {@fun/Threads/threading/Thread Thread}, {@fun/Threads/threading/Lock Lock}, {@fun/Threads/threading/Condition Condition}, {@fun/Threads/threading/Event Event}, {@fun/Threads/threading/Dict Dict}, {@fun/Threads/threading/pending pending}, {@fun/Threads/threading/eventLoop eventLoop}
mainThread Lock