Jaxer.Thread : Object
Return to: Jaxer Framework index

A namespace object used to access threading-related functionality, such as async processing

Platform Support

Jaxer Server FrameworkJaxer Client Framework
1.0no

Properties

PropertyActionJaxer Server FrameworkJaxer Client Framework
static currentThread : Object
The currently executing thread.
No Details 1.0no
static DEFAULT_MAX_MILLIS : Number
The default number of milliseconds to wait before timing out waitFor. Set to 3000 (3 seconds) by default).
No Details 1.0no

Functions

MethodActionJaxer Server FrameworkJaxer Client Framework
static waitFor(Function testFunction, [Number maxMillis]) : Boolean
Allows asynchronous processing (e.g. async XHR requests, async Sandbox loading, etc.) to happen and waits for them to complete -- completion is indicated by a test function returning true. You can specify a maximum time you want to wait before giving up and continuing.
Show Details1.0no

Parameters
FunctiontestFunctionThe function to evaluate periodically to see whether we should continue to wait. When testFunction returns true, the waitFor function exits.
NumbermaxMillis(optional)The number of milliseconds to wait for testFunction to return true before timing out and exiting. If this is zero or negative, waits indefinitely (though other timeouts may intervene)

Returns
Booleantrue if testFunction returned true, false if the timeout was reached before then

aptana_docs