Type/to search
Built-in Functions
Structures
Trade
Ticker
Record
Order
Condition
OrderBook
Depth
Account
Asset
Position
Market
Funding
OtherStruct
HttpQuery-options
HttpQuery-return
LogStatus-table
LogStatus-btnTypeOne
LogStatus-btnTypeTwo
Chart-options
KLineChart-options
SetData-data
EventLoop-return
DBExec-return
Thread.join-return
Built-in Variables

This JSON is the data structure returned by the join() member function of the Thread object, used to store information related to concurrent threads in JavaScript language strategies. The Thread object refers to a thread object created via threading.Thread().

Attributes

NameTypeDescription

id

number

Thread ID.

terminated

bool

Whether the thread was forcibly terminated.

elapsed

number

Thread execution time (nanoseconds).

ret

number

Return value of the thread function.

See Also

Remarks

The following code tests the timeout mechanism of the join() function of the Thread object and prints the return value of the join() function.

javascript
function testFunc() { for (var i = 0; i < 5; i++) { Log(i) Sleep(300) } } function main() { var t1 = threading.Thread(testFunc) Log(t1.join(1000)) // undefined Log(t1.join()) // {"id":1,"terminated":false,"elapsed":1506864000} }