Overview | Methods | This Package | All Packages
OverviewMethodsThis PackageAll Packages
Application.setThreadStorage
Sets an object in a specific thread's storage slot.
Syntax
public static void setThreadStorage( int index**, Object** object )
Parameters
index
The index to the thread's storage slot. This index must have been previously obtained by calling allocThreadStorage.
object
The object to store. This can be null to clear the object currently stored in the specified storage slot.
Remarks
You can use the setThreadStorage method to store thread-specific information, such as global objects or variables, that are needed by the thread. To retrieve the information from the thread's storage slot, you must preallocate a slot and have an index to that slot. To do this, use the allocThreadStorage method. For an example of how use this method, see allocThreadStorage.
See Also freeThreadStorage, getThreadStorage