ThreadSleep
- suspend thread for specified number of milliseconds

Miscellaneous functions
(AmiBroker 5.50)


SYNTAX ThreadSleep( milliseconds )
RETURNS NOTHING
FUNCTION ThreadSleep( milliseconds ) suspends current thread for specified number of milliseconds (maximum is 100 ms). Works only from NON-UI threads. When called from UI thread the function does NOTHING and returns immediatelly. Please do NOT abuse this function. Using it may negatively impact performance. The function is provided for advanced users to implement inter-thread synchronization. For more details see Tutorial: Effective use of multi-threading
EXAMPLE
SEE ALSO StaticVarCompareExchange() function

References:

The ThreadSleep function is used in the following formulas in AFL on-line library:

More information:

See updated/extended version on-line.