資源の読み込みに... 荷物...

メインスレッド



```mainThread()```函数返回主线程的线程对象。

```Thread```对象


mainThread()

```javascript
function main() {
    Log("主线程的threadId:", threading.mainThread().id())
}

主なスレッドを入手するThread文字列を表示するthreadId

function test() {
    Log("test函数中输出主线程Id:", threading.mainThread().id())
}

function main() {
    var t1 = threading.Thread(test)
    t1.join()
}

同期スレッドでは主スレッドのスレッドオブジェクトも取得できます.

復習システム,リアルディスク環境をサポートします.

{@fun/Threads/getThread getThread}, {@fun/Threads/threading/Thread Thread}, {@fun/Threads/threading/currentThread currentThread}, {@fun/Threads/threading/Lock Lock}, {@fun/Threads/threading/Condition Condition}, {@fun/Threads/threading/Event Event}, {@fun/Threads/threads/threading/Dict Dict}, {@fun/Threads/threading/currentThread currentThread}, {@fun/Threads/threading/threading/Lock Lock}, {@fun/Threads/threads/threading/eventLoop}, {@fun/Threads/threads/threading/eventLoop}, {@fun/Threads/threads/threads/threading/eventLoop}

getThread を取得する currentスレッド