# 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 Framework | Jaxer Client Framework
--- | ---
1.0 | no

## Properties

Property | Action | Jaxer Server Framework | Jaxer Client Framework
--- | --- | --- | ---
static currentThread : Object The currently executing thread. | No Details | 1.0 | no

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.0 | no

## Functions

Method | Action | Jaxer Server Framework | Jaxer 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 Details | 1.0 | no

Parameters

Function | testFunction | The function to evaluate periodically to see whether we should continue to wait. When testFunction returns true, the waitFor function exits.
Number | maxMillis | (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

Boolean | true if waitFor returned true, false if the timeout was reached before then

aptana_docs