Auto Assembler:createThreadAndWait
Jump to navigation
Jump to search
Auto Assembler createThreadAndWait(Address, Timeout OPTIONAL(7.1+) )
Will spawn a thread in the process at the specified address and wait till it returns and then continues assembling the code after the createThreadAndWait command.
Timeout lets you specify the time to wait in milliseconds before throwing an error, which is handy if the AA script runs in the main thread. If the timeout is missing, or smaller than 0, it will wait forever.
Note: In the case of CE 7.0 or earlier there was no timeout parameter, and the timeout is always set to 5000 ms (5 seconds). When you load a table made with CE 7.0 or earlier the behavior of AA scripts without a timeout parameter reverts back to 5000 instead of 0.
Command Parameters
Parameter | Type | Description |
---|---|---|
Address | string | The symbol or address to create the thread at |
Timeout | integer | Optional timeout (in ms) waiting the launched thread before throwing an error |
Examples
createThreadAndWait(SomeSymbol) // launch a new thread at SomeSymbol and wait for 5 seconds (CE 7.0-)
createThreadAndWait(00123ABC,0)
createThreadAndWait(MyThread,3000) // launch a new thread at MyThread and wait for 3 seconds (CE 7.1+)